Professional Documents
Culture Documents
CS Practical - Class 12 - 1
CS Practical - Class 12 - 1
Class 12
Submissi
S.N. Topics Date on
Date
1 Print total, percentage and grade of five subject marks through function. 13-Apr-22 20-Apr-22
i) Display flight number & number of flights from Mumbai from the
table flights.
ii) Arrange the contents of the table flights in the descending order of
destination.
iii)Increase the tax by 2% for the flights starting from Delhi.
iv)Display the flight number and fare to be paid for the flights from
Mumbai to Kochi using the tables, Flights & Fares, where the fare to
be paid =fare+fare*tax/100.
v) Display total no of source stations(eliminate duplicate) present in the
table.
vi)Display the fare for the flight for MUMBAI to BANGLORE
vii) Display the records of source stations started with letter ‘B’.
viii) Display the flight no. for which fare to be paid is less than 3000.
ix) Display total no. of flights available for each Airlines
x) Add a new column Dep_Time in the table Flight.
xi) Delete the record of flight no. IC301 from the table FARE.
xii) Increase the size of the column ‘source’ to 30 in the Table FLIGHT.
22 Consider the following tables WORKERS and DESIG. Write SQL commands for 14-Sep-22 12-Oct-22
the following statements.
Table: WORKERS
W_ID FIRSTNAM LASTNAME ADDRESS CITY
E
102 Sam Tones 33 Elm Street Paris
105 Sarah Ackerman 44 Street U.S.
144 Manila Sengupta 24 Street New York
210 George Smith 83 Street Howard
255 Mary Jones 842 vine Losantiville
300 Robert Samuel 9 fifth cross Washington
335 Henry Williams 12 Moore Street Boston
Table: DESIG
W_ID SALARY BENEFITS DESIGINATION
102 75000 15000 Manager
105 85000 25000 Director
144 70000 15000 Manager
210 50000 12500 Manager
255 45000 12000 Clerk
300 45000 10000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
451 28000 7500 Salesman
23 Consider the table given below and send the query through Python for the 12-Oct-22 19-Oct-22
following
TABLE: TEACHER
Code Teacher_Name Subject Qualification Designation Salary Experienc
001 R.P.Dixit English M.A. PGT 30000 15
002 S.N.Pandey Maths M.Sc. TGT 18000 12
003 Suhail Khan Maths M.Sc. PGT 28000 8
004 Sanjay Gautam Phy.Education M.P.Ed. PGT 25000 7
005 Sunil Singh Hindi Phd PGT 32000 9
006 Amar Baranwal Physics M.Sc. TGT 16000 6
007 Arun Pandey Chemistry M.Sc. PGT 25000 6
008 Vikas Tiwari Biology M.Sc. TGT 15000 8
009 Harmit Singh Accountancy M.Com. TGT 16000 4
010 Rakesh Tiwari Busi. Studies M.Com. PGT 24000 7
011 Santosh Kumar Fine Art MFA TGT 17000 10
(i) To Display the details of all the teachers in their decreasing order of experience.
(ii) To Show the sum of salary of PGT Teachers.
(iii) To display the Code , Name and Subject taught by the teachers whose qualification
is MSc.
(iv) To display the annual salary of each teacher with their code and name , assume
that the salary is given in table is per month
(v) To count the No. of teachers whose name start with letter ‘S’ OR letter ‘R’
24 Study the following tables DOCTOR and SALARY and send SQL commands 20-Oct-22 10-Nov-22
through Python for the questions
Table: DOCTOR
ID NAME DEPT SEX EXPERIENCE
101 Johan ENT M 12
104 Smith ORTHOPEDIC M 5
107 George CARDIOLOGY M 10
114 Lara SKIN F 3
109 K George MEDICINE F 9
105 Johnson ORTHOPEDIC M 10
117 Lucy ENT F 3
111 Bill MEDICINE F 12
130 Murphy ORTHOPEDIC M 15
Table: SALARY
ID BASIC ALLOWANCE CONSULTATION
101 12000 1000 300
104 23000 2300 500
107 32000 4000 500
114 12000 5200 100
109 42000 1700 200
105 18900 1690 300
130 21700 2600 300
(i) Display Name of all doctors who are in “MEDICINE” having more than 10
years experience from the table DOCTOR
(ii) Display the minimum ALLOWANCE of female doctors.
(iii) Display the highest consultation fee among all male doctors.
(iv) Display all the records of all doctors whose names is starting with ‘L’.
(v) To display the salary of each doctor with their id and name, assume that the
salary is sum of BASIC, ALLOWANCE, and CONSULTATION.
******************************