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 

Slide16.JPG

Slide17.JPG
Slide18.JPG
Slide19.JPG
Slide20.JPG Slide21.JPG Slide22.JPG

 

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo