Q. Consider the table "Item" given below and give the outputs on the basis of it:


Table: ITEM

 
Itemno Iname Price (Rs) Quantity
101 Soap 50 100
102 Powder 100 50
103 Facecream 150 25
104 Pen 50 200
105 Soapbox 20 100

(a) select sum(price) from item;

(b) select avg(price) from item;

(c) select min(price) from item;

(d) select max(price) from item;

(e) select count(price) from item;

(f) select distinct price from item;

(g) select count(distinct price) from item;

(h) select iname, price * quantity from item;


Answer :-

(a)

sum(price)
370

(b)

 
avg(price)
74

(c)

 
min(price)
20

(d)

 
max(price)
150

(e)

 
count(price)
5

(f)

 
distinct price
50
100
150
20

(g)

 
count( distinct price)
4

(h)

 
Iname price * quantity
Soap 5000
Powder 5000
Facecream 3750
Pen 10000
Soapbox 2000

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post