Fewpal
0 votes
749 views
in Computer by (47.7k points)
closed by

Write the outputs of the SQL queries (i) to (iii) based on the relations Teacher and Posting given below:

Table : Teacher
T_IDNameAgeDepartmentDate_of_joinSalaryGender
1Jugal34Computer Sc10/01/201712000M
2Shaemila31History24/03/200820000F
3Sandeep32Mathematics12/12/201630000M
4Sangeeta35History01/07/201540000F
5Rakesh42Mathematics05/09/200725000M
6Shyam50History27/06/200830000M
7Shiv Om44Computer Sc25/02/201721000M
8Shalakha33Mathematics31/07/201820000F

Table : Posting
P_IDDepartmentPlace
1HistotyAgra
2MathematicsRaipur
3Computer ScienceDelhi

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”;

1 Answer

+1 vote
by (50.2k points)
selected by
 
Best answer

OUTPUT:

i. 

DepartmentCount(*)
History3
Computer Sc2
Mathematics3

ii. Max - 31/07/2018 or 2018-07-31 Min- 05/09/2007 or 2007-09-05 

iii. 

NameDepartmentPlace
JugalComputer ScDelhi
Shiv OmComputer ScDelhi

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...