← Back to Joins
Question 100
Top Marks With Student Names
Top Marks With Student Names
Show every grade of 90 or more together with the student who earned it. Returnfirst_name,last_nameandgrade. A student with two such grades appears twice. Sort bygradefrom highest to lowest, then bylast_nameto settle the ties at 94 and 90.
Expected result:
+------------+-----------+-------+ | first_name | last_name | grade | +------------+-----------+-------+ | Sophia | Rossi | 99 | | Evelyn | Park | 97 | | Grace | Lee | 96 | | Evelyn | Park | 95 | | Mia | Haddad | 94 | | Emily | Zhang | 94 | | Grace | Lee | 93 | | Ava | Patel | 92 | | Emily | Zhang | 91 | | Charlotte | Dubois | 90 | +------------+-----------+-------+ (showing 10 of 11 rows)
Hints3 available
Sign in to use hintsTopics:
Joins
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)
Results
Run your SQL to see every statement's output here, then how it compares with the expected answer.
Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns — or open the database browser on the left.