Set 2
Set 2
import random
rRandomlist = [ ]
for a in range(0,4):
g = random,randint(1,30)
randomlist.append(g)
print(randomlist)
SQL
TABLE – DRESS
DCODE DESCRIPTION PRICE MCODE LAUNCHDATE
10001 FORMAL SHIRT 1250 M001 12-JAN-08
10020 FROCK 750 M004 09-SEP-07
10012 INFORMAL SHEET 1450 M002 06-JUN-08
10019 EVENING GOWN 850 M003 06-JUN-08
10023 TULIP SKIRT 850 M002 31-MAR-07
10089 PENCIL SKIRT 1250 M003 19-DEC-08
10007 SLACKS 850 M003 20-OCT-08
10009 FORMAL PANT 1450 M001 09-MAR-08
10024 INFORML PANT 1400 M002 20-OCT-08
10090 BABY TOP 650 M003 07-APR-07
(i)To display DCODE and DESCRIPTION of each dress in ascending order of DCODE.
(ii)To display the details of all dresses which have LAUNCHDATE in between 05-DEC-07
and 20-JUN-08(inclusive of both the dates)
(iii)To display the average PRICE of all the dresses which are made up of material with
MCODE as M003.
(iv)To display material wise highest and lowest price of dresses from DRESS table.
(Display MCODE of each dress along with the highest and lowest price)
ANSWERS
(i) Select DCODE , DESCRIPTION from DRESSS
OREDR BY DCODE;