← Back to Subqueries
Question 112
Departments Offering a Winter Course
Departments Offering a Winter Course
List the departments that offer at least one course in'Winter 2026'. Returncodeandname, sorted bycode. A department with two winter courses appears once, and Fine Arts, whose only course runs in the fall, must not appear. UseEXISTSwith a correlated subquery.
Expected result:
+------+------------------+ | code | name | +------+------------------+ | BIO | Biology | | BUS | Business | | CS | Computer Science | | ENG | English | | MATH | Mathematics | +------+------------------+ 5 rows
Hints3 available
Sign in to use hintsTopics:
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.