Order of operations
INTERSECT binds tighter than UNION and EXCEPT. UNION and EXCEPT share a level and go left to right. Parentheses override both.
task
SELECT 1 UNION SELECT 2 INTERSECT SELECT 2 returns 1 and 2, because the INTERSECT runs first. Add parentheses so the UNION runs first and the query returns only 2.