Courses Worth More Than 2 Credits
Fairhaven University's timetabling office is allocating double-length teaching slots for next semester. The rule is a credit threshold: a course carrying more than two credits gets the long slot, and a two-credit course is taught in a single one.
The office needs the titles and nothing else. They already hold the credit figures on their own spreadsheet, and repeating the numbers in a second document is an invitation for the two copies to disagree. Four courses is short enough to read by eye, but the booklet is regenerated every semester and nobody wants to re-read it each time.
courses — one row per course on offer. credits is how many credits the course is worth.
| id | title | credits |
|---|---|---|
| 1 | Intro to Databases | 3 |
| 2 | Machine Learning | 4 |
| 3 | Linear Algebra | 3 |
| 4 | Data Visualization | 2 |
The table already exists in the database — there is nothing to create or load.
Task: Write a query returning a single column, title, listing every course worth more than two credits, sorted alphabetically by title.
Example output — shape only, on an invented prospectus.
| title |
|---|
| Cloud Systems |
| Discrete Maths |
| Ethics in Data |
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