The CS Club Mailing List
The Computer Science society at Fairhaven University is rebuilding its mailing list from scratch after the last committee left without handing anything over. What they need is every student reading Computer Science, by name, and nothing else beside it — the list gets pasted into a mail-merge, so a stray GPA column would end up printed on an envelope.
The society's secretary works down the list by hand chasing anyone who has not replied, so it has to arrive in a sequence a person can follow.
students — one row per enrolled student. gpa is the grade point average already on file for that student, on a 0-4 scale.
| id | name | major | gpa |
|---|---|---|---|
| 1 | Nora Fischer | Computer Science | 3.8 |
| 2 | Omar Haddad | Statistics | 3.4 |
| 3 | Petra Novakova | Computer Science | 3.9 |
| 4 | Quinn Walsh | Mathematics | 3.1 |
| 5 | Ravi Shah | Statistics | 3.6 |
The table already exists in the database — there is nothing to create or load.
Task: Write a query that returns a single column, name, holding the name of every student whose major is Computer Science, sorted alphabetically by name.
Example output
If the major held two students, called Dana Ruiz and Tomas Vega, you would get:
| name |
|---|
| Dana Ruiz |
| Tomas Vega |
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in