Skip to content

Instantly share code, notes, and snippets.

Last active October 1, 2018 19:28
What would you like to do?
Facebook Ad Insights Spend
sum(spend) as total_spend,
sum(impressions) as total_impressions,
sum(spend) / sum(impressions) * 1000 as cpm,
sum(inline_link_clicks) as link_clicks,
sum(inline_link_clicks) / sum(impressions) as ctr
from facebook_ad_insights.ad_insights
where date = '2018-10-01'
group by 1
order by 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment