Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

SQL EXERCISE-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)
(i)

(ii):

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;

Practical 11: Consider the following table ‘Library’ and list all books with their date of purchase
(DOP) in decreasing order.
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.

You might also like