Scenario
The Student Life office is planning events targeted at students born in a specific age window. They need every current student whose birth_date falls between January 1, 2004 and December 31, 2006 inclusive. Biographical data lives on ods_person, so join ods_students to ods_person on ods_students.students_id = ods_person.id. Return the student ID, full name, and birth date, sorted chronologically.
Expected output
48 rows - one per current student born in the 2004-01-01 to 2006-12-31 range, with columns student_id, student_name, birth_date, sorted by birth_date ascending then student_id. Note that some person records have no birth_date on file; a NULL never satisfies BETWEEN, so those students are excluded automatically rather than needing a guard.
student_idstudent_namebirth_date
Tables
ods_students ods_person
Hints
Hints are a Pro feature. Upgrade