← Back to Subqueries
Question 107
Students Above the Average GPA
Students Above the Average GPA
List the students whosegpais above the college-wide averagegpa. Returnfirst_name,last_nameandgpa, sorted bygpafrom highest to lowest, thenlast_name. Students with nogpayet cannot be compared and are left out automatically.
Expected result:
+------------+-----------+------+ | first_name | last_name | gpa | +------------+-----------+------+ | Evelyn | Park | 3.98 | | Sophia | Rossi | 3.92 | | Grace | Lee | 3.88 | | Mia | Haddad | 3.8 | | Ava | Patel | 3.8 | | Emily | Zhang | 3.72 | | Charlotte | Dubois | 3.67 | | Scarlett | Johnson | 3.6 | | Harper | Singh | 3.55 | | Zoe | Campbell | 3.5 | +------------+-----------+------+ (showing 10 of 14 rows)
Hints3 available
Sign in to use hintsTopics:
Subqueries
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.