Query 1 - listing down all ad groups per campaign in the account, given conditions in Where clause
SELECT
FROM ad_group
WHERE
campaign.experiment_type = 'BASE'
AND campaign.status = 'ENABLED'
AND campaign.advertising_channel_type = 'SEARCH'
AND ad_group.status = 'ENABLED'
AND ad_group.name NOT LIKE '*DSA*'
QUERY 2 - listing down all ad groups with enabled ads per campaign
SELECT
FROM ad_group_ad
WHERE
campaign.experiment_type = 'BASE'
AND campaign.status = 'ENABLED'
AND campaign.advertising_channel_type = 'SEARCH'
AND ad_group.status = 'ENABLED'
AND ad_group.name NOT LIKE ‘DSA’
AND ad_group_ad.ad.type = 'RESPONSIVE_SEARCH_AD'
AND ad_group_ad.status = 'ENABLED'
Task: JOIN the 2 tables together in order to find enabled ad groups with missing ads.
From the initial research we found out that GAQL does not support join functions. In SQL this operation would allow us to quickly find enabled ad groups without any ads. LEFT JOIN in SQL would give us empty fields on the left.
What would be the way to do that? Is there a way to run 2 queries in the function script and then make a join of them?
OR is there any column in “ad_group” table, that would allow us to create a query, where we list all ad groups the non existing ads. We have run through the list of available fields and nothing brought our attention.
Also is it possible to get the entire columns of the query list at once instead of just row by row, since it takes a very long time.
Hi,
@Sigurd - We appreciate you for continuously sharing your insights to our members.
@Søren - Kindly try Sigurd's recommendation and let us know if you have any questions or encounter any issues on your end.
Regards,
|
||||||