Skip to content

Instantly share code, notes, and snippets.

@jbub
Created February 17, 2014 14:50
Show Gist options
  • Save jbub/9051966 to your computer and use it in GitHub Desktop.
Save jbub/9051966 to your computer and use it in GitHub Desktop.
Export order emails as comma separated values.
SELECT string_agg(DISTINCT email, ',') FROM orders_order WHERE date_add >= '2013-12-20'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment