BHARATHI VIDHYALAYA SENIOR SECONDARY SCHOOL
WORK SHEET – SQL DOUBLE TABLE
CLASS: XII SUBJECT: COMPUTER SCIENCE
1 Consider the following tables - STUDENT and STREAM :
What will be the ouput of the following statement? SELECT NAME, STRNAME FROM STUDENT S,
STREAM ST WHERE [Link]=[Link];
2 Consider the following tables GARMENT and FABRIC. Write SQL commands for the statements (i) to (iv).
(i) To display GCODE and DESCRIPTION of each GARMENT in descending order of GCODE.
(ii) To display the details of all the GARMENTs, which have READYDATE in between 08-DEC-07 and 16-
JUN-08 (inclusive of both the dates).
(iii) To display the average PRICE of all the GARMENTs. Which are made up of FABRIC with FCODE as F03.
(iv) To display FABRIC wise highest and lowest price of GARMENTs from GARMENT table.
(v) Display FCODE of each GARMENT alongwith highest and lowest price.) (b)
Write a command to remove all the records of a table “Shipping”.
3 Consider the tables CARS and SUPPLIER given below. What will be the output of the statement given?
SELECT CarName, Sname, Charges FROM CARS C, SUPPLIER S WHERE [Link]= S. Scode AND Charges > 15;
4
Varchar type with size 20.