Write the outputs of the SQL queries (i) to (iii) based on the relations Teacher and Posting given below:
Table : Teacher |
T_ID |
Name |
Age |
Department |
Date_of_join |
Salary |
Gender |
1 |
Jugal |
34 |
Computer Sc |
10/01/2017 |
12000 |
M |
2 |
Shaemila |
31 |
History |
24/03/2008 |
20000 |
F |
3 |
Sandeep |
32 |
Mathematics |
12/12/2016 |
30000 |
M |
4 |
Sangeeta |
35 |
History |
01/07/2015 |
40000 |
F |
5 |
Rakesh |
42 |
Mathematics |
05/09/2007 |
25000 |
M |
6 |
Shyam |
50 |
History |
27/06/2008 |
30000 |
M |
7 |
Shiv Om |
44 |
Computer Sc |
25/02/2017 |
21000 |
M |
8 |
Shalakha |
33 |
Mathematics |
31/07/2018 |
20000 |
F |
Table : Posting |
P_ID |
Department |
Place |
1 |
Histoty |
Agra |
2 |
Mathematics |
Raipur |
3 |
Computer Science |
Delhi |
i. SELECT Department, count(*) FROM Teacher GROUP BY Department;
ii. SELECT Max(Date_of_Join),Min(Date_of_Join) FROM Teacher;
iii. SELECT Teacher.name,Teacher.Department, Posting.Place FROM Teachr, Posting WHERE Teacher.Department = Posting.Department AND Posting.Place=”Delhi”;