Write the output of the queries (a) to (d) based on the table, Furniture given below:
Table: FURNITURE
FID |
NAME |
DATE OF PURCHASE |
COST |
DISCOUNT |
B001 |
Double Bed |
03-Jan-18 |
45000 |
10 |
T010 |
Dining Table |
10-Mar-20 |
51000 |
5 |
B004 |
Single Bed |
19-Jul-21 |
22000 |
0 |
C003 |
Long Back Chair |
30-Dec-16 |
12000 |
3 |
T006 |
Console Table |
17-Nov-19 |
15000 |
12 |
B006 |
Bunk Bed |
01-Jan-21 |
28000 |
14 |
(a) SELECT SUM(DISCOUNT)
FROM FURNITURE
WHERE COST>15000;
Answer
29
(b) SELECT MAX(DATE OF PURCHASE)
FROM FURNITURE;
Answer
19-Jul-2021
(c) SELECT * FROM FURNITURE
WHERE DISCOUNT>5 AND FID LIKE "T%";
Answer
FID |
Name |
Date of purchase |
Cost |
Discount |
T006 |
Console Table |
17-Nov-19 |
15000 |
12 |
(d) SELECT DATE OF PURCHASE FROM FURNITURE
WHERE NAME IN ("Dining Table", "Console Table");
Answer
10-Mar- 2020
17-Nov-2019