Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

henryp25
Copy link

@henryp25 henryp25 commented Aug 5, 2024

Adding first SQL query for image-loading-property-usage-2024

Copy link
Member

@tunetheweb tunetheweb left a 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.

Comment on lines +44 to +61
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;
Copy link
Member

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:

Suggested change
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;

@tunetheweb
Copy link
Member

Looks like this is included in #3791

@tunetheweb tunetheweb closed this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants