Fewpal
0 votes
198 views
in Information Technology by (47.4k points)

Consider the table STUDENT given below:

RollNoNameClassDOBGenderCityMarks
1AnandXI6/6/97MAgra430
2ChetanXII7/5/94MMumbai460
3GeetXI6/5/97FAgra470
4PreetiXII8/8/95FMumbai492
5SaniyalXII8/10/95MDelhi360
6MaakhiyXI12/12/94FDubai256
7NehaX8/12/95FMoscow324
8NishantX12/6/95MMoscow429

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

Please log in or register to answer this question.

1 Answer

+1 vote
by (46.2k points)

(1) d. Select class, max(marks) from student group by class;

(2) b. Both (ii) and (iv)

(3) b. select name,max(DOB) from student;

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

...