How to create AWQL with Custom date use "DURING"

34 views
Skip to first unread message

maist...@gmail.com

unread,
Jul 17, 2020, 12:06:58 AM7/17/20
to AdWords API and Google Ads API Forum
Hi,

I have try to get report use AWQL, but i want filter it by date, 
My AWQL script:
SELECT CampaignId,Amount,StartDate,EndDate,Period FROM CAMPAIGN_PERFORMANCE_REPORT DURING 20200701,20200705

==================================

My Result is like this :
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<report>
<report-name name="CAMPAIGN_PERFORMANCE_REPORT"/>
<date-range date="Jul 1, 2020-Jul 5, 2020"/>
<table>
<columns>
<column name="campaignID" display="Campaign ID"/>
<column name="budget" display="Budget"/>
<column name="startDate" display="Start date"/>
<column name="endDate" display="End date"/>
<column name="budgetPeriod" display="Budget period"/>
</columns>
<row budgetPeriod="day" endDate="--" startDate="2020-04-30" budget="100000000000" campaignID="9987381301"/>
<row budgetPeriod="day" endDate="--" startDate="2020-07-01" budget="100000000000" campaignID="10442839631"/>
<row budgetPeriod="day" endDate="--" startDate="2020-07-06" budget="128500000000" campaignID="10491338858"/>
<row budgetPeriod="day" endDate="--" startDate="2020-07-06" budget="1000000000000" campaignID="10494036699"/>
</table>
</report>

Can you tell me, which field is used for during clause? is it startDate or anything else?
because if "DURING" use startDate field then "DURING" not filtering my data.

Thanks, Regards..

Google Ads API Forum Advisor Prod

unread,
Jul 17, 2020, 10:08:48 AM7/17/20
to maist...@gmail.com, adwor...@googlegroups.com
Hi,

The DURING refers to the date range of your metrics, not your start or end date. So if you have the date range 20200701,20200705, it will give you the number of impressions, you had for that date range. If you want to add a filter for start or end date, you will need to include it in a WHERE clause.

Regards,
Anthony
Google Ads API Team

ref:_00D1U1174p._5004Q21mm0B:ref
Reply all
Reply to author
Forward
0 new messages