I love it, when I want to chronologically sort year & months formatted like 2016-1, 2016-2..2016-10 and the result is like: 2016-1, 2016-10, 2016-2.
This needs to stop.
with prep as (SELECT * ,cast(concat(cast(year as string), '-', case when length(cast(month as string)) = 1 then…