-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading Image loading property usage SQL #3713
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, but can you add an overall SEO 2024 PR and leave it in draft and add each of the SQL to that one PR? Then we can review once all done.
SELECT | ||
client, | ||
loading, | ||
COUNT(DISTINCT root_page) AS sites, | ||
COUNT(DISTINCT page) AS total_pages, | ||
COUNTIF(is_root_page = TRUE) AS count_homepage, | ||
COUNTIF(is_root_page = FALSE) AS count_secondarypage, | ||
COUNTIF(is_root_page = TRUE) / COUNT(DISTINCT page) AS homepage_pct, | ||
COUNTIF(is_root_page = FALSE) / COUNT(DISTINCT page) AS secondary_pct | ||
FROM | ||
image_loading, | ||
UNNEST(loading_property_markup_info.loading) AS loading | ||
GROUP BY | ||
client, | ||
loading | ||
ORDER BY | ||
client, | ||
loading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to report these separately by is_root_page
so you can get the correct percentages:
SELECT | |
client, | |
loading, | |
COUNT(DISTINCT root_page) AS sites, | |
COUNT(DISTINCT page) AS total_pages, | |
COUNTIF(is_root_page = TRUE) AS count_homepage, | |
COUNTIF(is_root_page = FALSE) AS count_secondarypage, | |
COUNTIF(is_root_page = TRUE) / COUNT(DISTINCT page) AS homepage_pct, | |
COUNTIF(is_root_page = FALSE) / COUNT(DISTINCT page) AS secondary_pct | |
FROM | |
image_loading, | |
UNNEST(loading_property_markup_info.loading) AS loading | |
GROUP BY | |
client, | |
loading | |
ORDER BY | |
client, | |
loading; | |
SELECT | |
client, | |
is_root_page, | |
loading, | |
COUNT(DISTINCT page) AS sites, | |
SUM(COUNT(DISTINCT page)) OVER (PARTITION BY client, is_root_page) AS total, | |
COUNT(0) / SUM(COUNT(DISTINCT page)) OVER (PARTITION BY client, is_root_page) AS pct | |
FROM | |
image_loading, | |
UNNEST(loading_property_markup_info.loading) AS loading | |
GROUP BY | |
client, | |
is_root_page, | |
loading | |
ORDER BY | |
client, | |
is_root_page, | |
loading; |
Looks like this is included in #3791 |
Adding first SQL query for image-loading-property-usage-2024