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
373 views
in Structured Query Language by (30.3k points)
closed by

A table Student consists of fields Roll No, Name, Batch and Percent. 

Write SQL statements to 

1. Display Roll No and Name of students whose percentage is Iessthan90 and greater than 70. 

2. Display Roll No and Name of all students in science batch whose percentage is more than 

3. Display Names of all students in commerce and science batches. 

4. Display the average Percent of students in each batch. 

5. Display Roll No and Name in the ascending order of Batch and descending order of Percent.

1 Answer

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

1. Select Roll No. Name from Student where percent < 90 and percent > 70;

2. Select Roll No. Name from Student where Batch = ’Science’ and percent > 90; 

3. Select Name from Student where batch = ’Science’ Or batch = ’Commerce’; 

4. Select batch, Avg(percent) from Student group by batch; 

5. Select Roll No. Name from Student order by batch, percent desc;

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.

...