For some accounts, the query below does not return all the clicks, impressions, and cost bc segmenting by keyword does not comprehensively cover all the activity. Afaik, it cannot return null or empty string for the keyword and I can't add `where segment.keyword.ad_group_criterion is null` to get the complement. Am I missing something or do I need to get it w and wo the segment and subtract the segmented values from the composite to get the complement?
SELECT
ad_group_ad.ad.id,
customer.id, segments.date, segments.keyword.ad_group_criterion, metrics.cost_micros, metrics.clicks, metrics.impressions
FROM ad_group_ad
WHERE segments.date = '2022-01-17' AND metrics.impressions > 0
Don Mitchell
principal architect automated traffic acquisition
cargurus