0% found this document useful (0 votes)
13 views1 page

Mysql Practice Questions

The document outlines a series of database operations for a database named School12B, including creating a TEACHER table and inserting records. It specifies various queries to display teacher data based on different criteria such as salary, subject, grade, and joining date. The document also includes operations for aggregating data like total number of teachers per subject and average salary per subject.

Uploaded by

pandeyurja777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Mysql Practice Questions

The document outlines a series of database operations for a database named School12B, including creating a TEACHER table and inserting records. It specifies various queries to display teacher data based on different criteria such as salary, subject, grade, and joining date. The document also includes operations for aggregating data like total number of teachers per subject and average salary per subject.

Uploaded by

pandeyurja777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1-Create a database named School12B

2-Open the database School12B


3-Create table named
TEACHER(ID,Name,Subject,Salary,Grade,City,Date_Of_Joining)
4-Insert 10 records in the table created above.
5-Display complete data from the table TEACHER
6-Display only teacher name and salary from teacher table
7-Display details of all teachers teaching CS
8-Display details of all teachers whose salary is 10000 or above
9-Display details of all CS teacher whose salary is below 10000
10- Display details of all teachers who teaches grade 12
11- Display details of all teachers whose salary is between 10000 to
20000
12- Display details of all teachers of CS teaching grade 10
13- Display details of all teachers teaching in grade 7,9 and 11.
14- Display details of all teachers teaching CS,IT and IP
15- Display details of all teachers other than CS and IT
16- Display Different subjects taught by teachers.
17- Display details of all teachers whose salary is not known.
18- Display details of all teachers who joined before 2020.
19- Display details of teachers whose name starts with letter A
20- Display details of all teachers in alphabetical order of name.
21- Display Name and salary of all teachers in descending order of
salary.
22- Display total no of teachers in each subject.
23- Display average salary of teacher in each subject.
24- Display total no. of teachers in each city
25- Display highest paid teacher in each subject.

You might also like