How i can make subquery in Google ads query language?

110 views
Skip to first unread message

Yevhen Serdiuk

unread,
Oct 14, 2022, 4:02:43 PM10/14/22
to Google Ads API and AdWords API Forum
Hi, I need to get ads, but only from ad groups with > 1k impressions. How i can do this? Can i use subquery (firstly to get  ad groups with > 1k impressions and then get ads ). I don't understand how i can use metrics, when i use metrics it shows me inmpressions per ad.not group. Thank you!

Google Ads API Forum Advisor

unread,
Oct 17, 2022, 2:51:54 AM10/17/22
to nabazo...@gmail.com, adwor...@googlegroups.com

Hello Yevhen,

 

Michael here from Google Ads API Team. Thank you for reaching out to us.

 

With regards to your concern, I'm afraid that there isn't way to make subquery in Google ads query language, however, you may use below GAQL to get the performance data for at the Ad level.

SELECT ad_group_ad.ad.name, metrics.impressions FROM ad_group_ad WHERE metrics.impressions > 1000

 

To get the data at Ad_group level, you may use below GAQL:

 

SELECT ad_group.name, ad_group.id, metrics.impressions FROM ad_group WHERE metrics.impressions > 1000

 

In addition, you may also utilize the Google Ads query builder should you need to output other resources. Furthermore, if you are expecting data that you are seeing on the Ads UI, then you may provide us the complete Ads UI screenshot without cropping via reply privately to author option, so that we can check better.

Regards,

Google Logo
Michael Angelo
Google Ads API Team
 


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