Q. Write a output for SQL queries (i) to (iii), which are based on the table: STUDENT given below:


Table: STUDENT

 
 
 
RollNo Name Class DOB Gender City Marks
1 Nanda Х 06-06-1995 M Agra 551
2 Saurabh XII 07-05-1993 M Mumbai 462
3 Sanal XI 06-05-1994 F Delhi 400
4 Trisla XII 08-08-1995 F Mumbai 450
5 Stort XII 08-10-1995 M Delhi 369
6 Marisla XI 12-12-1994 F Dubai 250
7 Neha Х 08-12-1995 F Moscow 377
8 Nishant X 12-06-1995 M Moscow 489

(i) SELECT COUNT(*), City FROM STUDENT GROUP BY CITY HAVING

(ii) SELECT MAX (DOB), MIN(DOB) FROM

(iii) SELECT NAME, GENDER FROM STUDENT WHERE CITY = "Delhi";


Answer =

(i)

 

COUNT(*)

City

2

Mumbai

2

Delhi

2

Moscow


(ii)

 

MAX (DOB)

MIN(DOB)

08-12-1995

07-05-1993


(iii)

 

NAME

GENDER

Sanal

F

Stort

M

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post