Skip to content

Instantly share code, notes, and snippets.

@jthandy
Created April 14, 2016 18:00
Show Gist options
  • Save jthandy/ec30a9c77e627b47ebffc7841936a901 to your computer and use it in GitHub Desktop.
Save jthandy/ec30a9c77e627b47ebffc7841936a901 to your computer and use it in GitHub Desktop.
with email_summary as (
select *
from {{env.schema}}.mailchimp_email_summary
)
select email_id, sum(clicked)::float / sum(opened)
from email_summary
group by 1
having sum(opened) > 5
order by 2 desc
limit 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment