Download Latest and Complete pdf series of CBSE IP Class 12 Practical Program Worksheets with code and output covers all important topics.
Practical Worksheets for Class 12 IP are designed to help students develop logical and analytical capabilities, problem solving skills, and improve their subject knowledge. these worksheets are best study materials for students designed by professionals who have vast experience in subject. Practicing these worksheets will certainly enrich student’s thinking skills, subject level understanding, conceptual knowledge, and academic excellence.
Find out all these worksheets available in in both online and PDF format for Class 12 IP SQL Practical Questions which student can access, download and practice offline and become more competitive. All practical programs
Contents
Database Management MySQL Practical Worksheet-1
Practical 1: Create following table using SQL statements.
Client table | ||
Field name | Data type | Attributes |
Clientno | char(6) | Primary key |
Name | Varchar(20) | Not Null |
City | Varchar(50) | Not Null |
Pin | Number | |
Mobile | Char(10) |
Practical 2: Insert and display following data in Client table (made in practical1) using SQL statements.
Client table | ||||
Clientno | Name | City | Pin | Mobile |
C00001 | Ivan Bayross | Bombay | 400054 | 3456212343 |
C00002 | Vandana Saitwal | Madras | 780001 | 8976532322 |
C00003 | Pramada Jaguste | Bombay | 400007 | 9090898765 |
C00004 | Ravi Shreedharan | Delhi | 110020 | 8727121232 |
C00005 | Rukmani | Kolkata | 340003 | 2312376543 |
C00006 | Pradeep Singhania | Jaipur | 130102 | 1222132333 |
C00007 | Geoge Paul | Kolkata | 340010 | 3323211232 |
C0008 | D Ravichandran | Bombay | 400014 | 2212387896 |
Practical 3: Display the name of those clients whose name contains ‘van’ (refer table ‘Client’ of Practical 2)
Practical 4: List records of all clients who are not from Bombay. (refer table ‘Client’ of Practical 2)
Practical 5: Display Different cities. (Refer table ‘Client’ of Practical 2)
Practical 6: Create a table ‘Club’ with proper Integrity constraints and insert data as given below:
Coachid | Coachname | Age | Sport | Dateofapp | Pay | Gender |
1 | Karan | 35 | Karate | 27/03/19 | 10000 | M |
2 | Ravina | 34 | Karate | 20/01/20 | 12000 | F |
3 | Kamal | 34 | Squash | 19/02/20 | 20000 | M |
4 | Tarun | 33 | Basketball | 01/01/20 | 15000 | M |
5 | Sumeru | 36 | Swimming | 12/01/20 | 7500 | M |
6 | Anjani | 36 | Swimming | 24/02/20 | 8000 | F |
7 | Shamima | 37 | Squash | 20/02/20 | 22000 | F |
8 | Soumya | 30 | Karate | 22/02/20 | 11000 | F |
Practical 7: Display information about coaches whose name start with K or pay is at least 1500 or both. (Refer table ‘Club’ of Practical 6)
Practical 8: Write a query to display report showing coachname, pay, age and bonus (15% of pay) for all coaches. (Refer table ‘Club’ of Practical 6)
Practical 9: Display information about all male coaches. (Refer table ‘Club’ of Practical 6)
Practical 10: Write command to display the output as (Refer table ‘Club’ of Practical 6)
Karan |
Tarun |
Anjani |
soumya |
Practical 11: Consider the following table Movie and display all movies which fall in the category of Comedy or Action.. (NCERT Textbook)
MovieID | MovieName | Category | ReleaseDate | Production Cost | Business Cost |
001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
005 | Telugu_Movie | Action | – | 100000 | – |
006 | Punjabo_Movie | Comedy | – | 30500 | – |
Practical 12: Consider the table Movie of practical 11 and display all movies which have not been released yet. (NCERT Textbook)
Practical 13: Consider the table Movie of Practical 11 and display net profit of each movie showing its ID, Name and Net Profit. (NCERT Textbook)
(Hint: NetProfit = BusinessCost –ProductionCost)
Make sure that the new column name is labeled as NetProfit. Is this column now a part of the MOVIE relation. If no, then what name coined for such columns? What can you say about the profit of a movie which has not yet released? Does your query result show profit as zero?.
Practical 14: Consider the following table ‘Stock’ and display all items which name begins with ‘s’ in descending order of rate
Icode | Iname | Brand | Qty | Rate |
101 | Soap | Lux | 100 | 34 |
102 | Salt | Patanjali | 110 | 20 |
103 | Sugar | Annapurna | 200 | 56 |
104 | Coffe | Nestle | 60 | 140 |
105 | Maggi | Nestle | 90 | 83 |
106 | Cake | Britannia | 40 | 10 |
107 | Biscuit | Britannia | 130 | 5 |
108 | Musturd Oil | Patanjali | 75 | 180 |
109 | Jam | Kissan | 20 | 54 |
110 | Tea | Brook Bond | 30 | 160 |
Practical 15: consider the table ‘stock’ of practical 14 and list item name and quantity which rate lies between 50 to 100 rupees.
Download PDF for SQL Worksheet – 1
Database Management MySQL Practical Worksheet-2
Practical 1: Study following table ‘Doctor’ and write SQL command to display female doctor names with remainder of Consultation and experience of department ENT or Medicine.
ID | Name | Dept | Gender | Experience | Consultation |
201 | Jaya Reddy | ENT | F | 12 | 700 |
202 | Sanjay Pandey | Medicine | M | 5 | 700 |
203 | Rakesh Mittal | Orthopedic | F | 10 | 600 |
204 | ShaliniLakra | Skin | F | 4 | 400 |
205 | Ajay Singh | Cardiology | M | 9 | 550 |
206 | ArunBissa | Medicine | M | 15 | 800 |
207 | GurmeetKheda | Orthopedic | M | 11 | 700 |
208 | Malini Shankar | ENT | F | 7 | 500 |
209 | Jubaida Hassan | Medicine | F | 6 | 500 |
210 | Tia jena | Neurology | F | 2 | 300 |
Practical 2: Consider table ‘Doctor’ of practical 1 and write SQL command to display the average consultation charges of all doctors having more than 5 year experience.
Practical 3: Consider table ‘Doctor’ of practical 1 and display minimum consultation charge of male doctors.
Practical 4: Write SQL command to fetch four characters of doctor name. (refer ‘Doctor’ table of Practical 1)
Practical 5: Display output of query: SELECT mid(‘techtipnow computer education’,11,9);
Practical 6: What will be output if you add trim() method in given query of practical 5 as:
SELECT trim(mid(‘techtipnow computer education’,11,9));
Practical 7: Study following table ‘CLUB’ and write SQL command to display all member names and fees after giving 12.5% discount.
Mcode | Mname | Age | Fees | Type |
M1 | Anshuman | 35 | 7000 | Monthly |
M2 | Aradhya | 25 | 8000 | Monthly |
M3 | Sushmita | 42 | 24000 | Yearly |
M4 | Poorvika | 27 | 12000 | Quartly |
M5 | Kritika | 30 | 14000 | Yearly |
M6 | Sandesh | 32 | 15000 | Monthly |
Practical 8: Modify query of Practical 7 to display fee after discount with rounding off to zero decimal places.
Practical 9: display member names in capital letters whose age not in between 25 to 30yrs. (refer table ‘Club’ of practical 7)
Practical 10: Write SQL command to display eldest member name with his/her fee from table ‘Club’ of Practical 7.
Practical 11: Display result of SQL Command: SELECT INSTR(SUBSTR(‘techtipnow computers’,8,7), ‘o’);
Practical 12: Consider the following table ‘Stock’ and display all brands with its total quantities.
Icode | Iname | Brand | Qty | Rate |
101 | Soap | Lux | 100 | 34 |
102 | Salt | Patanjali | 110 | 20 |
103 | Sugar | Patanjali | 200 | 56 |
104 | Coffe | Nestle | 60 | 140 |
105 | Maggi | Nestle | 90 | 83 |
106 | Cake | Britannia | 20 | 10 |
107 | Biscuit | Britannia | 130 | 5 |
108 | Musturd Oil | Patanjali | 75 | 180 |
109 | Jam | Kissan | 20 | 54 |
110 | Tea | Brook Bond | 30 | 160 |
Practical 13: Write SQL command to display item name with its price of those having brandwise highest price. (Refer table ‘Stock’ of Practical 12)
Practical 14: predict Output of given query (Refer table ‘Stock’ of practical 12):
SELECTMAX(Rate)+ MIN(Rate) from Stock where Brand = ‘Patanjali’;
Practical 15: predict Output of given query (Refer table ‘Stock’ of practical 12):
SELECTavg(length(Iname)) from Stock where Iname like ‘S%’ or Qty = 20;
Download PDF for SQL Worksheet – 2
Database Management MySQL Practical Worksheet-3
Practical 1: Study following table ‘Inventory’ and write SQL command to display the name of the costliest car with fuel type ‘Petrol’. (NCERT Textbook)
CardID | CarName | Price | Model | Yearmanufacture | Fueltype | Discount |
D001 | Car1 | 582613.00 | LXI | 2017 | Pertrol | 0.00 |
D002 | Car1 | 673112.00 | VXI | 2018 | Petrol | 6731.00 |
B001 | Car2 | 567031.00 | Sigmal.2 | 2019 | Petrol | 6808.00 |
B002 | Car2 | 647858.00 | Deltal.2 | 2018 | Petrol | 7774.96 |
E001 | Car3 | 355205.00 | 5 STR STD | 2017 | CNG | 4262.46 |
E002 | Car3 | 695914.00 | CARE | 2018 | CNG | 8350.96 |
S001 | Car4 | 514000.00 | LXI | 2017 | Petrol | 6168.00 |
S002 | Car4 | 614000.00 | VXI | 2018 | Petrol | 7368.00 |
Practical 2: Write SQL command to calculate the average discount and total discount available on Car4. (Refer table ‘Inventory of Practical 1)[NCERT Textbook]
Practical 3: list the total no of cars having no discount. (Refer table ‘Inventory of Practical 1)[NCERT Textbook]
Practical 4: Write SQL command to find the highest price for each Car. (Refer table ‘Inventory of Practical 1)[NCERT Textbook]
Practical 5: for the given table ‘Inventory’ in practical 1 arrange and display all records in ascending order of year of manufacturing.
Practical 6: Write the output produced by SQL command “SELECT MONTH(“2002/12/24”);”
Practical 7: Write the output produced by SQL command “SELECT ROUND(618.4391,-2);”
Practical 8: Display output of SQL Command “SELECT SUBSTR(“techtipnow computers”, 12);”
Practical 9: Write output of SQL Command “SELECT MONTHNAME(curdate());”
Practical 10: Consider the table Supplier given below and predict the output for given SQL Command:
SELECT AVG(Status) FROM Supplier;
SID | Status |
S1 | 10 |
S2 | 30 |
S3 | NULL |
S4 | 40 |
S5 | 30 |
Practical 11: Consider the following table ‘Library’ and list all books with their date of purchase (DOP) in decreasing order.
No | Title | Author | Type | DOP | Qty | price |
1 | Data Structure | Dixit | DS | 12/10/2003 | 4 | 300 |
2 | Computer Studies | French | FND | 11/11/2003 | 2 | 75 |
3 | Advanced Pascal | Shildt | PROG | 01/12/2003 | 4 | 350 |
4 | Dbase Dummies | Palmer | DBMS | 23/12/2003 | 5 | 130 |
5 | Mastering C++ | Dixit | PROG | 08/01/2004 | 3 | 295 |
6 | Guide Network | Freed | NET | 10/02/2004 | 3 | 200 |
7 | Mastering Foxpro | Seigal | DBMS | 17/02/2004 | 2 | 135 |
8 | DOS Guide | Norton | OS | 11/03/2004 | 3 | 175 |
9 | Basic for beginner | Morton | PROG | 21/04/2004 | 3 | 40 |
10 | Mastering C Programs | Dixit | PROG | 06/05/2004 | 1 | 195 |
Practical 12: Give the output of SQL Command : (Refer Library table of Practical 11)
SELECT MOD(Qty/Price) FROM Library WHERE Author = ‘Dixit’;
Practical 13: Consider ‘Library’ table given in Practical 10 and Count and display all books which Rate is greater than equal to 200.
Practical 14: Predict the output for given SQL Command:
SELECT SUBSTR(1473.8, 3,1)
Practical 15: For given table ‘Stock’ Suraj has written following SQL Command to display most expensive Item Brandwise:
SELECT Iname, Brand, MAX(Rate) FROM Stock;
But he is not getting desired output. help him to write correct command.
Icode | Iname | Brand | Qty | Rate |
101 | Soap | Lux | 100 | 34 |
102 | Salt | Patanjali | 110 | 20 |
103 | Sugar | Annapurna | 200 | 56 |
104 | Coffe | Nestle | 60 | 140 |
105 | Maggi | Nestle | 90 | 83 |
106 | Cake | Britannia | 40 | 10 |
107 | Biscuit | Britannia | 130 | 5 |
108 | Musturd Oil | Patanjali | 75 | 180 |
109 | Jam | Kissan | 20 | 54 |
110 | Tea | Brook Bond | 30 | 160 |
Download PDF for SQL Worksheet – 3
Database Management MySQL Practical Worksheet-4
Practical 1: Consider the following table ‘Cloth’ and display name of cloth in capital letters purchased in year 2020.
CCode | CName | Size | Colour | Price | DOP |
C001 | Jeans | L | Blue | 1230.67 | 11/12/20 |
C002 | Jeans | XL | Blue | 1340.89 | 14/12/20 |
C003 | Shirt | XL | Red | 870.50 | 24/11/20 |
C004 | Trouser | L | Khaki | 990.99 | 02/01/21 |
C005 | T-Shirt | XL | White | 552.45 | 08/01/21 |
Practical 2: for given table ‘Cloth’ of Practical 1, write SQL command to display number of cloths purchased each year.
Practical 3: Write the output of the following SQL command:
SELECT ROUND(288.795,-2);
Practical 4: For table ‘Salesman’ with fieldnames sid, sname, zone, amount, Write SQL command to display all salesman name in descending order.
practical 5: Consider table ‘Items’ and write SQL query to display average qty available for each Brand where average qty is/are more than 50.
Icode | Iname | Brand | Qty | Rate |
101 | Soap | Lux | 100 | 34 |
102 | Salt | Patanjali | 110 | 20 |
103 | Sugar | Patanjali | 200 | 56 |
104 | Coffe | Nestle | 60 | 140 |
105 | Maggi | Nestle | 90 | 83 |
106 | Cake | Britannia | 20 | 10 |
107 | Biscuit | Britannia | 130 | 5 |
108 | Musturd Oil | Patanjali | 75 | 180 |
109 | Jam | Kissan | 20 | 54 |
110 | Tea | Brook Bond | 30 | 160 |
Practical 6: for given table ‘Items’ of Practical 5, Display minimum rate of item of ‘Patanjali’.
Practical 7: Write SQL command to display name of weekday of your date of birth.
Practical 8: Write SQL command to count number of characters in your school name.
Practical 9: Display the output of following SQL command:
SELECT RIGHT(SUBSTR(‘GATEWAY OF INDIA’,-8,5),2);
Practical 10: Write SQL command to calculate cube of 8.
Practical 11: Write the output of SQL command:
SELECT LENGTH(TRIM(“###techtipnow computers## “)); (# refers to blank space)
Practical 12: for the given table ‘Hospital’ write SQL command to display name all patient admitted in month of May.
PID | PNAME | GENDER | ADMITDATE | DEPT | FEES |
AP/PT/001 | Rahil Khan | M | 21/04/2019 | ENT | 250 |
AP/PT/002 | Jitendal Pal | M | 12/05/2019 | Cardio | 400 |
AP/PT/003 | Suman Lakra | F | 19/05/2019 | Cardio | 400 |
AP/PT/004 | Chandumal Jain | M | 24/06/2019 | Neuro | 600 |
Practical 13: For given table ‘Hospital’ in Practical 10, List and count total Male/Female patient.
Practical 14: For given string “techtipnow computer education”, Write SQL command to display the position of “education”.
Practical 15: For given table ‘Order’ display those customer nos that have more than 2 orders.
Ono | Cno | Ino | Qty | Total |
1 | 1 | 1 | 10 | 100 |
2 | 2 | 1 | 10 | 100 |
3 | 3 | 2 | 5 | 60 |
4 | 4 | 3 | 10 | 200 |
5 | 1 | 2 | 10 | 120 |
6 | 5 | 1 | 10 | 100 |
7 | 4 | 3 | 5 | 100 |