I am a bit confused about what kind of join is this in the code that is in yellow(below). It seems like an implicit join to me but I thought instead of using "ON" we use "WHERE" to specify which column we are using to join two tables together. But here, it doesn't look like it has "WHERE". The only possible reason I can think of is that since there is only one number in the CTE(seat_count), then I do not need to specify which column I am using?
In case anyone wants some idea about the problem:
QUERY(Labeled picture):
QUERY(In text):
WITH seat_count AS( SELECT COUNT(*) AS counts FROM seat) SELECT (CASE WHEN MOD(id,2)!= 0 AND counts != id THEN id+1 WHEN MOD(id,2)!= 0 AND counts = id THEN id ELSE id-1 END) AS id, student FROM seat, seat_count ORDER BY id ASC 

CROSS JOINclause instead. I would suggest you get this material updated.