Professional Documents
Culture Documents
SCHOOL
SESSION : 2021-22
PRINCIPAL’S SIGNATURE :
SUBJECT TEACHER’S SIGNATURE:
ACKNOWLEDGEMENT
TABLE: STUDENT
TABLE: POSTING
ANS. Select Name from student where Gender =’F’ and Department
=’Mathematics’;
4)To display name, bonus for each teacher where bonus is 10% of salary.
TABLE : CUSTOMER
Q3) Consider the following tables STORE and SUPPLIERS. Write SQL
commands for given statements.
TABLE : store
TABLE : suppliers
2) To display ItemNo and item name of those items from store table
whose rate is more than 15.
TABLE : Company
TABLE: MODEL
4) To display company name and company head office where head office
name ends with ‘a’.
ANS. Select CompName, CompHO from Company where CompHO like ‘%a’ ;
Q5) Write SQL qureries for (i) to (iv) and find outputs for SQL queries (v) to
(viii), which are based on the tables TRANSPORT and TRIP :
TABLE : Transport
TABLE : Trip
1)To display NO, Name, Tdate from the table Trip in descending order of NO.
3) To display NO and Name of the drivers from Trip who traveled between
‘2016-02-10’ and ‘2016-04-10’.
ANS. Select NO, Name from Trip where Tdate between ‘2016-02-10’ and
‘2016-04-10’ ;
4) To display all details from table Trip in which distance travelled is more
than 100KM in ascending order of NOP;
ANS. Select NO, Name, Tdate, KM, Tcode where KM>100 order by NOP;
Q6) CONSIDER THE GIVEN TABLES PRODUCTS AND CLIENTS. WRITE SQL
COMMANDS FOR GIVEN STATEMENTS.
TABLE : PRODUCT
TABLE : CLIENT
TABLE : School
TABLE : Admin
ANS.
2)Select Teacher from School where Experience>12 order by Teacher.
ANS.
ANS.
ANS.
ANS.
Q8) WRITE SQL COMMAND FOR THE QUERIES BASED ON TABLES
WATCHES AND SALE GIVEN BELOW.
TABLE : Watches
TABLE : Sale
1)To display all the details of those watches whose name ends with
‘Time’.
ANS. Select * from Watches where like= ‘%Time’ ;
2)To display watch’s name and price of those watches which have
price range in between 5000-15000;
4) Give output:
TABLE : SHOP
TABLE : ACCESSORIES
1)To display Name and Price of all the accessories an ascending order.
ANS. Select Id, Sname from SHOP where Area= ‘Nehru Place’;
3)To display minimum and maximum price of each name of
ACCESSORIES.
TABLE : COURSES
3)Write output:
ANS.
4)Write output.
TABLE: Resort
TABLE: OwnedBy
1)To display Rcode and Place of all 5 Star resorts in alphabetical order
of the place from table Resort.
ANS. Select Rcode, Place from Resort where Type= ‘5 Star’ order by
Place;
2) To display the maximum and minimum rent for each type of resort
from table Resort.
Select Place, Owner from Resort where Type= ‘2 Star’ order by Rent;
ANS.
4) Give output.
Select Place, Owner from OwnedBy where Place like “%A”;
ANS.
THANK YOU !