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

Duplicated technology version values #32

Open
max-ostapenko opened this issue Jan 15, 2025 · 0 comments
Open

Duplicated technology version values #32

max-ostapenko opened this issue Jan 15, 2025 · 0 comments

Comments

@max-ostapenko
Copy link

Working on HTTPArchive/dataform#48 and noticed that we have many duplicated version values:

SELECT
  tech,
  ARRAY_LENGTH(tech.info) AS count,
  COUNT(DISTINCT version) AS count_distinct
FROM crawl.pages,
  UNNEST(technologies) AS tech,
  UNNEST(tech.info) AS version
WHERE
  date = '2024-11-01' AND
  client = 'mobile' AND
  rank = 1000 AND
  tech.technology LIKE 'WordPress%'
GROUP BY 1,2
Image

Seems like it's the case whenever there are >1 category for a technology:

SELECT
  tech,
  ARRAY_LENGTH(tech.info) AS count,
  COUNT(DISTINCT version) AS count_distinct
FROM crawl.pages,
  UNNEST(technologies) AS tech,
  UNNEST(tech.info) AS version
WHERE
  date = '2024-11-01' AND
  client = 'mobile' AND
  rank = 1000 AND
  ARRAY_LENGTH(tech.categories) > 2
GROUP BY 1,2
Image

Having distinct values instead would make iterating over the versions more efficient.

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

No branches or pull requests

1 participant