← Back to Joins
Question 103
Who Earned an A in What
Who Earned an A in What
List every A grade on record with the student's name and the course code. Returnfirst_name,last_name,codeandgrade, one row per A, whereletteris'A'. Sort bylast_name,first_name, thencode.
Expected result:
+------------+-----------+---------+-------+ | first_name | last_name | code | grade | +------------+-----------+---------+-------+ | Charlotte | Dubois | BUS150 | 88 | | Charlotte | Dubois | CS101 | 85 | | Charlotte | Dubois | MATH110 | 90 | | Mia | Haddad | ENG101 | 94 | | Scarlett | Johnson | ENG101 | 90 | | Grace | Lee | CS101 | 93 | | Grace | Lee | CS310 | 96 | | Grace | Lee | MATH110 | 88 | | Ella | Murphy | ENG101 | 88 | | Evelyn | Park | MATH110 | 97 | +------------+-----------+---------+-------+ (showing 10 of 19 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.