MYSQL
MYSQL
UNSOLVED QUESTIONS
Table: WORKER
Chander
12 Operator P003 22-02-2010 12-07-1987
Nath
Ameen
15 Mechanic P002 21-08-2006 13-03-1984
Ahmed
Q22 Consider the tables given below and answer the questions
that follow:
Table: EVENT
(a) Name the Primary keys in both the tables and the Foreign key in
'Event' table. Can NumPerformers (Number of performers) be set as
the Primary key? Give reason.
ANS 4 * 4 = 16
(c) Write the commands in SQL:
(i) To display Eventld, Event name, Celebrityld for only those events
that have more than 10 performers.
(ii) To display Celebrityld and names of celebrities who have
"Khan" anywhere in their names.
Table: TEACHER
TeacherID TName City Subject Qualification Designation
Table: STUDENT
TeacherID
StdID Name FName Stream
Mathur".
(h) Find out the cities of teachers who are teaching Maths.
(i) Find out the name of teacher who is getting the lowest salary
among PGTS.
(j) Display the list of students who are taught by PGTs only.
Q24 Consider the following table and answer the questions
that follow.
Table: TEACHER2
(c) To list names, departments and date of hiring of all the teachers
in ascending order of date of joining.
table SPORTS:
(a) Display the names of the students who have grade 'A' in either
Game1 or Game2 or both.
(b) Display the number of students having game 'Cricket'.
(c) Display the names of students who have the same game for
both Game1 and Game2.
(d) Display the games taken by the students whose name starts
with 'A'.
Table: ITEM
(d) Display the item information whose name starts with letter 's'.
(e) Display a report with item number, item name and total price
(total price = price * quantity).
(f) select distinct price from item;