google-ads-apigoogle-ads-script

A compound WHERE clause in GAQL?


Could you please confirm GQAL doesn't support compound WHERE clause?

 FROM group_placement_view\
 WHERE\
    metrics.impressions >= 10000 \
    AND (metrics.video_view_rate < 10' OR metrics.average_cpm > 10000 )

and not event OR as non-compound clause?

    metrics.average_cpm\
 FROM group_placement_view\
 WHERE\
    metrics.impressions >= 10000 \
    OR metrics.video_view_rate < 10'

Solution

  • WHERE clause may only contain AND conditions https://developers.google.com/google-ads/api/docs/query/grammar