Databases SQL Reporting by Example Day 2: Advanced Selecting Student Schedule

My Code for this lesson using CTE

WITH classes_ids AS (SELECT CLASS_ID FROM SCHEDULE
JOIN STUDENTS ON SCHEDULE.STUDENT_ID = STUDENTS.ID WHERE STUDENTS.FIRST_NAME = "Rex" AND STUDENTS.LAST_NAME = "Rios")
SELECT classes_ids.CLASS_ID AS Class, PERIODS.ID AS PERIOD, PERIODS.START_TIME AS "START TIME", PERIODS.DURATION AS DURATION, ROOMS.ID AS ROOM, SUBJECTS.NAME AS SUBJECT

FROM classes_ids 
JOIN CLASSES ON classes_ids.CLASS_ID = CLASSES.ID
JOIN PERIODS ON CLASSES.PERIOD_ID = PERIODS.ID 
JOIN ROOMS ON CLASSES.ROOM_ID = ROOMS.ID
JOIN SUBJECTS ON CLASSES.SUBJECT_ID = SUBJECTS.ID
ORDER BY PERIODS.ID;