KEMBAR78
Xii SQL Single Table | PDF
0% found this document useful (0 votes)
18 views5 pages

Xii SQL Single Table

Uploaded by

thilakeswaran820
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views5 pages

Xii SQL Single Table

Uploaded by

thilakeswaran820
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

BHARATHI VIDHYALAYA SENIOR SECONDARY SCHOOL

WORK SHEET – SQL SINGLE TABLE


CLASS: XII SUBJECT: COMPUTER SCIENCE
1 Write the output for SQL queries (i) to (iv), which are based on the table ITEMS.

(i) SELECT MAX(Price), MIN(Price) FROM ITEMS;


(ii) SELECT Price * Qty AS AMOUNT FROM ITEMS WHERE Code=1004;
(iii) SELECT DISTINCT TCode FROM ITEMS;
(iv) SELECT MAX(Company) FROM ITEMS WHERE Price > 7000;
2 Write the output for SQL queries (i) to (iv), which are based on the table CARDEN.

(i) SELECT COUNT(DISTINCT Make) FROM CARDEN;


(ii) SELECT COUNT(*) Make FROM CARDEN;
(iii) SELECT CarName FROM CARDEN WHERE Capacity = 4;
(iv) SELECT SUM (Charges) FROM CARDEN WHERE Color = “SILVER”;
3 Write the output of the queries (i) to (iv) based on the table FURNITURE given below

(b) SELECT SUM(DISCOUNT) FROM FURNITURE WHERE COST>15000;


(ii) SELECT MAX(DATEOFPURCHASE) FROM FURNITURE;
(iii) SELECT * FROM FURNITURE WHERE DISCOUNT>5 AND FID LIKE “T%”;
(iv) SELECT DATEOFPURCHASE FROM FURNITURE WHERE NAME IN (“Dinning Table”, “Console
Table”);
(b) Write a command to remove all the records of the table “Garments” whose Readydate is after “20-Oct-2008”.
4 Give the output of the following sql statement based on table GRADUATE:
i) Select MIN(AVERAGE) from GRADUATE where
SUBJECT=“PHYSICS”; ii)Select SUM(STIPEND) from GRADUATE WHERE
div='II'; iii)Select AVG(STIPEND) from GRADUATE where AVERAGE>=65;
Give the output of the following SQL queries:

i) SELECT COUNT(DISTINCT Make) FROM CARDEN; ii) SELECT


MAX(Charges),MIN(Charges) FROM CARDEN; iii)SELECT COUNT(*),Make
FROM CARDEN order by make;
Write the SQL commands for(a )to (e).

a)Display the names of the students who have grade ‘C’ in either Game1 or
Game2 or both
b) Display the number of students getting grade ‘A’ in Cricket.
c) Display the names of the students who have the same game for both
Game1 and Game2. d) Display the game1 taken up by the students, whose
name starts with ‘A’.
e) To display different classes in Sports table.

You might also like