Final Project: Query a Mini Course Catalog
Time to combine everything into a set of real queries against a small schema of your own design, with tables like students(id, name, xp), courses(id, title), and enrollments(student_id, course_id).
Requirements
- Write a
SELECTwith aWHEREclause that lists all students above a given XP threshold. - Write a query that
JOINs students and enrollments (and courses) to show which courses each student is taking. - Write a query using
GROUP BYandCOUNTto show how many students are enrolled in each course. - Write an
UPDATEstatement that safely modifies a specific row, with aWHEREclause. - Write an
INSERTstatement that adds a new student.
Stretch goals
- Use a
LEFT JOINto find students with zero enrollments. - Use
HAVINGto find courses with more than a set number of students. - Add a
DELETEstatement (with a safeWHEREclause!) for removing a dropped enrollment.
Submit a link to your schema and queries (e.g. a repo or gist) below when you are done, an instructor will review it before you can mark this lesson complete. Good luck! 🚀