Last active
October 1, 2018 19:28
-
-
Save mattm/bbeff1ec71ddd663ca83ff476a71b41d to your computer and use it in GitHub Desktop.
Facebook Ad Insights Spend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
campaign_id, | |
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