Sunday, 9 August 2026

GRADE 12 : PRACTICAL 16 : 10th August 2026

 Create the below tables and perform the required queries:


FURNITURE:


+----+-----------------+--------------+-------------+----------+----------+

| no | itemname        | type         | dateofstock | price    | discount |

+----+-----------------+--------------+-------------+----------+----------+

|  1 | dolphin         | baby cot     | 19-02-2002  |  9500.00 |       20 |

|  2 | decent          | office table | 01-01-2002  | 25000.00 |       30 |

|  3 | comfort zone    | double bed   | 12-01-2002  | 25000.00 |       25 |

|  4 | donald          | baby cot     | 24-02-2002  |  6500.00 |       15 |

|  5 | royal finish    | office table | 20-02-2002  | 18000.00 |       90 |

|  6 | royal tiger     | sofa         | 22-02-2002  | 31000.00 |       30 |

|  7 | economy sitting | sofa         | 13-12-2001  |  9500.00 |       25 |

|  8 | eating paradise | dining table | 19-02-2002  | 11500.00 |       25 |

+----+-----------------+--------------+-------------+----------+----------+  


ARRIVALS:


+----+--------------+------------+-------------+----------+----------+

| no | itemname     | type       | dateofstock | price    | discount |

+----+--------------+------------+-------------+----------+----------+

|  1 | wood comfort | double bed | 23-03-2003  | 25000.00 |       25 |

|  2 | old fox      | sofa       | 20-03-2003  | 17000.00 |       20 |

|  3 | micky        | baby cot   | 1-4-2003    |  7500.00 |       15 |

+----+--------------+------------+-------------+----------+----------+



1)Show all the information about baby cots from the furniture table 2)To list the itemname which are priced at more than 15000 from the furniture table with a heading as ‘Highend_items’ 3)To list itemnames and types of those items in which date of stock is before 22/02/2002 from the furniture table in descending order of the item name 4)To display item name and date of stock of those items in which the discount percentage is less than 20 or more than 25. 5)To display the item type and corresponding count. 6) Insert all the rows from arrivals into the furniture table
7) Delete all the rows from Arrivals table; 8) Display item no, item name, mrp and the discounted price for all items 9) Display all the furniture types that have an average discount percent greater than 20.

10) Display item details whose names start with 'royal' or end with 'comfort'.

11) Display items from furniture whose price is above the average price of all items.

12) Combine all unique item types available in the FURNITURE table.

13) Display the item name and price of the item(s) that have the highest price in the FURNITURE table.

14) Display the item name, price, and year of stock for all items stocked during the year 2002