Question: SQL question: write a SQL query that gets the top 3 students with the highest grades for both genders in the class. An example of

SQL question:

write a SQL query that gets the top 3 students with the highest grades for both genders in the class.

An example of the original table should look like this (table name is "t1"):

SQL question: write a SQL query that gets the top 3 students

The expected result should look like this:

with the highest grades for both genders in the class. An example

Thank you!

ID grade gender 1 78 male 2 56 male 3 89 female 4 93 male 5 99 female 6 77 female 7 100 female 8 54 female 9 90 female 10 90 male 11 88 male 12 87 male 13 96 female 14 97 male 15 34 female 16 23 male 17 72 male 18 98 female 19 68 female 66 male 21 87 male 77 male 23 78 female 24 96 male 25 96 female 26 42 male 27 47 female 28 85 female 29 88 male 30 94 male 20 ID grade gender 7 100 female 5 99 female 18 98 female 14 97 male 24. 96 male 30 94 male

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!