← Back to SELECT Basics
Question 32
Students With No Declared Major
Students With No Declared Major
Four students have not chosen a major yet. Return theirfirst_name,last_nameandenrollment_year. A missing major is stored as NULL inmajor_department_id, and NULL cannot be found with=.
Expected result:
+------------+-----------+-----------------+ | first_name | last_name | enrollment_year | +------------+-----------+-----------------+ | Noah | Kim | 2024 | | Amelia | Schmidt | 2024 | | Benjamin | Ivanov | 2023 | | Aiden | Rahman | 2026 | +------------+-----------+-----------------+ 4 rows
Hints2 available
Sign in to use hintsTopics:
SELECT Basics
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.