Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eliank/133eb36a36bb099b6c392fb3d446e838 to your computer and use it in GitHub Desktop.
Save eliank/133eb36a36bb099b6c392fb3d446e838 to your computer and use it in GitHub Desktop.
SELECT “some_table”.”id” FROM “some_table” WHERE (some_variable IN (‘some_value’, ‘another_value’, ‘yet_another_value’) AND ((some_date <= ‘2016–05–01’ AND DATE_TRUNC(‘day’, updated_at) <= some_date) AND (“some_table”.”id” > 133891263636178370) ORDER BY “some_table”.”id” ASC, “some_table”.”some_variable” ASC LIMIT 1000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment