(iii) SELECT SNAME, MARKS FROM STUDENT WHERE SECTION = 2 ORDER BY MARKS DESC;

Answer:

Answer by student

The output of the SQL query is:

SNAME

MARKS

PRIYA

90

ANITA

80

RAHUL

65

PREETI

60

Detailed answer by teachoo

-lock-

The given query selects the SNAME and MARKS columns from the table STUDENT, but only for those rows where the SECTION column is equal to 2 . This means that it will only consider the students who belong to section 2. The query also orders the output by the MARKS column in descending order. This means that it will arrange the output from highest to lowest marks. Therefore, the output of this query is:

SNAME

MARKS

PRIYA

90

ANITA

80

RAHUL

65

PREETI

60

-endlock-

Remove Ads
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.