Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
130k views
in Computer by (46.1k 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_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”;

1 Answer

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

OUTPUT:

i. 

Department Count(*)
History 3
Computer Sc 2
Mathematics 3

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

iii. 

Name Department Place
Jugal Computer Sc Delhi
Shiv Om Computer Sc Delhi

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

...