Skip to content

Instantly share code, notes, and snippets.

@andrechavesg
Created November 27, 2015 23:07
Show Gist options
  • Save andrechavesg/5499b6470bd0039e0dea to your computer and use it in GitHub Desktop.
Save andrechavesg/5499b6470bd0039e0dea to your computer and use it in GitHub Desktop.
select count(distinct usuario_id) from compra c where c.momentoDaCompra >
= now() - interval 30 day and c.momentoDaCompra <= now() - interval 29 day;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment