Skip to content

Instantly share code, notes, and snippets.

@kalendae
Created March 6, 2009 20:22
Show Gist options
  • Save kalendae/75056 to your computer and use it in GitHub Desktop.
Save kalendae/75056 to your computer and use it in GitHub Desktop.
sql for finding noimage open rate
total clicks for a group:
select count(distinct clicks.id) from clicks where group_id = 9 and scrubbed=0 and cookie_id is not null;
total clicks that have a corresponding impression
select count(distinct c.id) from clicks as c, opens as o where c.group_id = 9 and scrubbed=0 and cookie_id is not null and c.group_id = o.group_id and c.ad_id = o.ad_id and c.email_address_id = o.email_address_id and c.batch_id = o.batch_id;
estimated run time 1min
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment