CJCoding With Joseph
15free / daySign inCreate account

Departments Offering a Winter Course

List the departments that offer at least one course in 'Winter 2026'. Return code and name, sorted by code. A department with two winter courses appears once, and Fine Arts, whose only course runs in the fall, must not appear. Use EXISTS with a correlated subquery.

Expected result:

+------+------------------+
| code | name             |
+------+------------------+
| BIO  | Biology          |
| BUS  | Business         |
| CS   | Computer Science |
| ENG  | English          |
| MATH | Mathematics      |
+------+------------------+
5 rows
Hints3 available
Topics:
Subqueries
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.