Check sibling questions

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 

Are ads bothering you?

Davneet Singh's photo - Teacher, Engineer, Marketer

Made by

Davneet Singh

Davneet Singh is a graduate from Indian Institute of Technology, Kanpur. He has been teaching from the past 12 years. He provides courses for Maths and Science at Teachoo.