Hello,
I need to get all cost_micros for a certain period. In the query below, I 
get all the data for the period I specified, but there is one problem. In 
the event that there were no clicks on a certain day, i.e. nothing was 
spent, I need to get 0. That is, if the period spans 20 days, then I want 
to get 20 values, some of which may be equal to 0. Now, in this case, I 
get, for example, 18 values ​​for 20 days, and then I can't match dates and 
expenses. I don't want to make separate queries for each date as some 
periods can span 5-7 years.

$query = "SELECT campaign.name, campaign.start_date, campaign.end_date, 
metrics.cost_micros, segments.date FROM campaign
WHERE segments.date >= " . "'" . $startDate . "'" . "
AND segments.date <= " . "'" . $endDate . "'" . "
AND campaign.id IN (".implode(', ',$campaignIds).") ORDER BY campaign.id";

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3205e4f5-ef3f-4175-9511-6965b3e21787n%40googlegroups.com.
  • Ge... Vladimir Hiuk
    • ... Vladimir Hiuk
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to