[Assignments] Simple Queries in SQL — Chapter 12 Assignments (Q/A)

|
Table of Contents

Sumita Arora Assignments for Class 12 Computer Science Chapter 12

These are MySQL Grade 12 practical questions. Though, Simple Queries in SQL doesn’t contain any type based questions, it contains an assignment which mostly contains practical questions only. Follow along for the most popular question in SQL for class 12 i.e.,
Write sql commands for the following on the basis of given table: student, student1 (Q10, Q14, Q15) (Page 2, Page 6, Page 7)

Authored by Sumita Arora, this chapter introduces learners to the basics of database management, focusing on simple SQL queries. These assignments offer a gentle initiation, gradually building students’ confidence in crafting and executing SQL queries.

Consider table Empl given in solved problems and answer the following questions.

empnoenamejobmgrhiredatesalcommdeptno
8369SMITHCLERK890218.12.90800.00NULL20
8499ANYASALESMAN869820.2.911600.00300.0030
8521SETHSALESMAN869822.2.911250.00500.0030
8566MAHADEVANMANAGER88392.4.912985.00NULL20
8654MOMINSALESMAN869828.9.911250.001400.0030
8698BINAMANAGER88391.5.912850.00NULL30
8882SHIVANSHMANAGER88399.6.912450.00NULL10
8888SCOTTANALYST85669.12.923000.00NULL20
8839AMIRPRESIDENTNULL18.11.915000.00NULL10
8844KULDEEPSALESMAN86988.9.911500.000.0030
8886ANOOPCLERK888812.1.931100.00NULL20
8900JATINCLERK86983.12.91950.00NULL30
8902FAKIRANALYST85663.12.913000.00NULL20
8934MITACLERK888223.1.921300.00NULL10
Table : Empl

1. Write a query to display EName and Sal of employees whose salary is greater than or equal to 2200 from table Empl.

2. Write a query to display details of employees who are not getting commission from table Empl.

3. Write a query to display employee name and salary of those employee who don’t have their salary in the range of 2500 to 4000.

4. Write a query to display the name, job title and salary of employee who do not have manager.

5. Write a query to display the name of employee whose name contains ‘A’ as third alphabet.

6. Write a query to display the name of employee whose name contains ‘T’ as the last alphabet.

7. Write a query to display the name of employee whose name contains ‘M’ as first alphabet & ‘L’ as third alphabet.

8. Write a query on the customers table whose output will exclude all customers with a rating <=100, unless they are located in Shimla.

9. Write a query that selects all orders (Order table) except those with zeros or NULLs in the amt field.

"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *