Skip to content

Instantly share code, notes, and snippets.

@joshed-io
Created March 26, 2021 14:37
Show Gist options
  • Save joshed-io/74b6429d2d16c8938b84d3980715225d to your computer and use it in GitHub Desktop.
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
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