Created
March 26, 2021 14:37
-
-
Save joshed-io/74b6429d2d16c8938b84d3980715225d to your computer and use it in GitHub Desktop.
Proving the MOD function creates slices whose counts add up to the full count
This file contains 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 count(*) from my_table where MOD(id, 10) = ANY('{0,1,2,3,4,5,6,7,8,9}'::int[]); | |
-- 3296168 | |
select count(*) from my_table; | |
-- 3296168 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment