Practical Practice Questions
Practical Practice Questions
5 marks
2. Write a Program to calculate area of a circle using Netbeans IDE. 5 marks
3. Consider following table named Workers, write commands of following questions 5 marks
ECode Name Desig PLevel Doj Dob
11 Radhe Shyam Supervisor P001 13-sep-2004 23-Aug-1981
12 Chander Nath Operator P003 22-feb-2010 12-jul-1987
13 Fizza Operator P003 14-jun-2009 14-oct-1983
15 Ameen Ahmed Mechanic P002 21-aug-2006 13-mar-1984
18 Sanya Clerk P002 19-dec-2005 09-jun-1983
a) Write a query to display the details of all WORKERs in descending order of DOB.
b) Write a query to display NAME and DESIG of those WORKERs, whose PLEVEL is either P001 or P002.
c) Write a query to display the content of all the WORKERs table, whose DOB is in between ’19-JAN-1984’
and ’18-JAN-1987’.
d) Write a query to add a new row with the following:
19, Daya Kishore’,’Operator’, ‘P003’,’19-jun-2008’, ’11-jul-1984’
e) Write a query to display the name of all the P003 from WORKER.
4. Consider following table named LAB, write output of SQL of following questions 5 marks
No. Itemname CostPerItem Quantity Date of Purchase Warranty Operational
1 Computer 6000 9 21/5/96 2 7
2 Printer 15000 3 21//5/97 4 2
3 Scanner 18000 1 29/8/98 3 1
4 Camera 21000 2 13/6/96 1 2
5 Hub 8000 1 31/10/99 2 1
6 Ups 5000 5 21/5/96 1 4
7 Plotter 25000 2 11/1/2000 2 2
a) To display the details of all the products in ascending order of product names.
b) To display the price, product name and quantity (i.e. qty) of those products which have quantity more than
100.
c) To display product name and price of all those products, whose price is 22000.
d) To display the maximum price Product Name.
e) To display the Pname, Qty, Price whose company is RENIX.
4. Consider following table named Teacher, write output of SQL of following questions 5 marks
NO Name Department DateofJoining Salary Status
1 Raja Computer 21/5/98 8000 M
2 Sangita History 21/5/97 9000 F
3 Ritu Sociology 29/8/98 8000 F
4 Kumar Linguistics 13/6/96 10000 M
5 Venkatraman History 31/10/99 8000 M
6 Sidhu Computer 21/5/86 14000 M
7 Aishwarya Sociology 11/1/1988 12000 F
a) Write a query to display the names of all GAMES with their GCODES.
b) Write a query to display details of those GAMES which are having Prize Money more than 7000.
c) Write a query to display the content of the GAMES table in ascending order of schedule Date.
d) Write a query to display sum of Prize Money for each types of GAMES.
e) Write a query to display the names of all the indoor games.
4. Consider following table named Hospital, write output of SQL of following questions 5 marks
NO Name Age Department Dateofadm Charges status
1 Arpit 62 Surgery 21/01/98 300 M
2 Zarina 22 ENT 12/12/97 250 F
3 Kareem 32 Orthopedic 19/02/98 200 M
4 Arun 12 Surgery 11/01/98 300 M
5 Zubin 30 ENT 12/01/98 250 M
6 Ketaki 16 ENT 24/02/98 250 F
7 Ankita 29 Cardiology 20/02/98 800 F
8 Zareen 45 Gynecology 22/02/98 300 F
9 Kush 19 Cardiology 13/02/98 800 M
10 Shilpa 23 Nucl medicine 21/02/98 400 F
4. Consider following table named Club, write output of SQL of following questions 5 marks
NO COACHNAME AGE SPORTS DATEOFAPP PAY STATUS
1 Kukreja 35 Karate 27/03/1996 1000 M
2 Ravina 34 Karate 20/01/1998 1200 F
3 Karan 34 Squash 19/02/1998 2000 M
4 Tarun 33 Basketball 01/01/1998 1500 M
5 Zubin 36 Swimming 12/01/1998 750 M
6 Ketaki 36 Swimming 24/02/1998 800 F
7 Ankita 39 Squash 22/02/1998 2200 F
8 Zareen 37 karate 22/02/1998 1100 F
9 Kush 41 swimminh 13/01/1998 900 M
10 shailya 37 Basketball 09/02/1998 1700 M