Created
September 15, 2025 15:57
-
-
Save dwsmart/acae316266612e8bc99945f94a208b06 to your computer and use it in GitHub Desktop.
Get impressions and average impressions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUM(impressions) as impressions, | |
SUM(sum_position) / SUM(impressions) as ave_pos | |
FROM `{your_project_here}.searchdata_url_impression` WHERE | |
data_date >= PARSE_DATE('%Y%m%d', '20250907') | |
AND data_date <= PARSE_DATE('%Y%m%d', '20250913') | |
## uncomment next line to see impressions where the average position is greater than, as BQ counts from Zero, | |
## subtract 1 so for greater than 10, have > 9 | |
# AND sum_position / impressions > 9 | |
## for less than uncomment this line same minus 1 rule applies,so for ave pos in the top 10 you want <= 9 | |
# AND sum_position / impressions <= 9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment