Mysql 001
Mysql 001
d. List the name of all the teachers in the order of their joining date.
f. Count the number of teachers who are older than 23 years of age.
g. Display name, age and Salary for all teacher whose salary between 10000 and 20000.
i. Display Name, Age and Salary of Male Teachers in the ascending order of age.
c. Write MYSQL Query to create above table CLUB inside database society
d. Show the information about the swimming coaches in the table club.
e. List the names of all coaches in the descending order of their date of appointment.
f. Display a report showing coachname , age , and pay for all the coaches.
h. List the total number of records are available in the table CLUB.
j. Insert a new row with the values: 11, prakash, 37, squash, 25/02/98.
g. Display only the name , age ,and charges of all the female patients.
l. Display Name, Age & Sex of all female patients whose age is between 30 to 60 years.
n. Show the details of all patients whose charges are 350,400,500 and 1000
b. List all the students sorted by average marks in the descending order.
c. Display a report listing name, stipend , stream and class of class 11 students.
e. Display Student Name and Class for all students who secured Grade A.
f. Display the sum of stipend of all students who have taken Medical Stream.
SET : 5
Give the following EMPLOYEE relation:
No Name Age Branch Dateofrtd Salary Sex
1 Pankaj 54 Engg. 10/01/97 1200 M
2 Shalini 41 Estbl. 24/03/98 2000 F
3 Sanjay 32 Engg. 12/12/96 3500 M
4 Sudha 25 Science 01/07/99 4700 F
5 Rakesh 32 Engg. 05/09/97 2500 M
6 Shakeel 40 Language 27/06/98 3000 M
7 Surya 44 Estbl. 25/02/97 2100 M
8 Shikha 33 Science 31/07/97 2600 F
a. Show information about the employees of the engg. Branch.
b. List the names of the female employee who are in the science branch.
c. List the names of all the employees in the order of their date of retirement.
c. Select all the books of type Prog published by Bpb from the table library.
d. Display a list of all the books with price more than 130 .
g. Display all books published by bpb publisher arranged in the order of their price.
h. Display the details of all books published by Zpress in the descending order by price.
SET : 7
Give the following SPORTS relation:
StudentNo Class Name Game1 Grade1 Game2 Grade2
10 7 Sameer Cricket B Swimming A
11 8 Sujit Tennis A Skating C
12 7 Kamal Swimming B Football B
13 7 Veena Tennis C Tennis A
14 9 Archana Basketball A Cricket A
15 10 Arpit Cricket A Athletics C
a. Display the names of the students who have grade ‘C’ in either Game1 or Game2 or both.
b. Display the number of students getting grade ‘ A’ in cricket.
c. Display the names of the students who have same game for both Game1 and Game2.
d. Display the games taken up by the students, whose name starts with A’.
e. Arrange the whole table in the alphabetical order of name.
f. Update the grade of Sameer to ‘A’.
g. Delete the student who got grade C in grade2
h. Display name and class of all students whose name is ending with letter ‘a’.
i. Display the details of student who are tennis player and belong to class 7.
SET: 10
Give the following Lists relation:
Name Roll Sec Age Marks
Sagun 2 A 15 247
Gagan 4 B 14 367
Rhythm 6 C 15 293
Rohit 10 C 13 387
Sonia 26 B 12 485
Mohit 7 A 13 476
Nisha 25 B 11 466
Bobby 20 A 16 370
Pooja 15 C 15 183
Rahul 12 B 15 464
a. Select students from Class whose marks lie in the range of 200 to 300.
b. Display name , roll no. of the students with marks more than 400 and sorted by marks.
c. Display all sorted by section.
d. List all student of section A.
e. Display a report listing a name , section , marks and percentage of each student.
Calculate percentage for all the students marks/500*100.
f. Count the number of students of section C.
[6] Manish Kumar Gupta, PGT Computer Science