I came across an odd bit of legacy code while going back through old code for cleanup, and I'm trying to pin down exactly what it does...
CROSS JOIN (SELECT 0 as a UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3) as b
It's a technique I haven't seen before, including multiple union selects of numbers inside a cross join, and I'm honestly really confused about what it's doing and why someone would do it.