0% found this document useful (0 votes)
2 views1 page

SQL Queries for Garment and School Data

Uploaded by

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

SQL Queries for Garment and School Data

Uploaded by

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

SET-A

i. Select distinct Qty from garment;


ii. Select sum(Qty) from garment group by CCode having count(*)>1;
iii. Select GNAME, CNAME, RATE from garment g, cloth c where
[Link]=[Link] and Qty>100;
iv. Select avg(Rate) from garment where rate between 1200 and 2000;

SET-B
i)SELECT SUM (PERIODS), SUBJECT FROM SCHOOL GROUP BY SUBJECT ;

ii)SELECT MIN(EXPERIENCE), MAX(CODE) FROM SCHOOL;

iii)SELECT TEACHERNAME, GENDER FROM SCHOOL, ADMIN WHERE


DESIGNATION = �COORDINATOR� AND [Link]=[Link];
iv)SELECT COUNT(DISTINCT SUBJECT) FROM SCHOOL;

You might also like