Last active
May 13, 2024 22:40
-
-
Save evokateur/5d1b26e03c6f6ca3e5336c9910677769 to your computer and use it in GitHub Desktop.
select 1 to 10000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT @row := @row + 1 as i FROM | |
(select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t, | |
(select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t2, | |
(select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t3, | |
(select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t4, | |
(SELECT @row:=0) t5; |
months 1 through 12
select i as month from
(
select (t1.i + t2.i + t4.i + t8.i + t16.i) i from
(select 0 i union all select 1 i) t1
cross join (select 0 i union all select 2 i) t2
cross join (select 0 i union all select 4 i) t4
cross join (select 0 i union all select 8 i) t8
cross join (select 0 i union all select 16 i) t16
) foo
where i between 1 and 12 order by i;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A range of years