CJCoding With Joseph
15free / daySign inCreate account

Lecturers and Assistant Professors

Return first_name, last_name and title for every instructor whose title is either Lecturer or Assistant Professor. Sort by title, then by last_name. Use a list membership test rather than two separate comparisons.

Expected result:

+------------+-----------+---------------------+
| first_name | last_name | title               |
+------------+-----------+---------------------+
| Tomasz     | Nowak     | Assistant Professor |
| Daniel     | Reyes     | Assistant Professor |
| Yuki       | Tanaka    | Assistant Professor |
| Marcus     | Lindqvist | Lecturer            |
| Rafael     | Moreno    | Lecturer            |
| Priya      | Natarajan | Lecturer            |
+------------+-----------+---------------------+
6 rows
Hints3 available
Topics:
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.