Skip to content

Commit

Permalink
Remove commented-out lines and include percentage in results.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Aug 12, 2024
1 parent 99d39a7 commit f47b635
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sql/2024/08/performance-lab-plugins-adoption.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ WITH urlsWithPerformanceLabPlugins AS (
SELECT
client,
page,
# COUNT(DISTINCT page) OVER (PARTITION BY client) AS total,
HAS_PERFORMANCE_LAB(GET_GENERATOR_CONTENTS(custom_metrics)) AS has_pl,
EXTRACT_PL_PLUGINS_FROM_GENERATOR_CONTENTS(GET_GENERATOR_CONTENTS(custom_metrics)) AS plugins
FROM
Expand All @@ -94,9 +93,8 @@ SELECT
plugin,
COUNT(DISTINCT page) AS urls,
COUNT(DISTINCT IF(has_pl = TRUE, page, NULL)) AS urls_with_pl,
COUNT(DISTINCT IF(has_pl = FALSE, page, NULL)) AS urls_without_pl
# ANY_VALUE(total) AS total,
# COUNT(DISTINCT page) / ANY_VALUE(total) AS pct_total
COUNT(DISTINCT IF(has_pl = FALSE, page, NULL)) AS urls_without_pl,
COUNT(DISTINCT IF(has_pl = TRUE, page, NULL)) / COUNT(DISTINCT page) AS pct_with_pl
FROM
urlsWithPerformanceLabPlugins,
UNNEST(plugins) AS plugin
Expand Down

0 comments on commit f47b635

Please sign in to comment.