Consider the table STUDENT given below:
RollNo |
Name |
Class |
DOB |
Gender |
City |
Marks |
1 |
Anand |
XI |
6/6/97 |
M |
Agra |
430 |
2 |
Chetan |
XII |
7/5/94 |
M |
Mumbai |
460 |
3 |
Geet |
XI |
6/5/97 |
F |
Agra |
470 |
4 |
Preeti |
XII |
8/8/95 |
F |
Mumbai |
492 |
5 |
Saniyal |
XII |
8/10/95 |
M |
Delhi |
360 |
6 |
Maakhiy |
XI |
12/12/94 |
F |
Dubai |
256 |
7 |
Neha |
X |
8/12/95 |
F |
Moscow |
324 |
8 |
Nishant |
X |
12/6/95 |
M |
Moscow |
429 |
(1) Prachi has given the following command to obtain the highest marks Select max(marks) from student where group by class;
but she is not getting the desired result. Help her by writing the correct command.
a. Select max(marks) from student where group by class;
b. Select class, max(marks) from student group by marks;
c. Select class, max(marks) group by class from student;
d. Select class, max(marks) from student group by class;
(2) State the command to display the average marks scored by students of each gender who are in class XI?
i. Select gender, avg(marks) from student where class= “XI” group by gender;
ii Select gender, avg(marks) from student group by gender where class=”XI”;
iii. Select gender, avg(marks) group by gender from student having class=”XI”;
iv. Select gender, avg(marks) from student group by gender having class = “XI”;
Choose the correct option:
a. Both (ii) and (iii)
b. Both (ii) and (iv)
c. Both (i) and (iii)
d. Only (iii)
(3) Help Ritesh to write the command to display the name of the youngest student?
a. select name,min(DOB) from student;
b. select name,max(DOB) from student;
c. select name,min(DOB) from student group by name;
d. select name,maximum(DOB) from student;