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

Create Query of Newest Helix Pages-Powered Websites #190

Open
trieloff opened this issue May 7, 2020 · 0 comments
Open

Create Query of Newest Helix Pages-Powered Websites #190

trieloff opened this issue May 7, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@trieloff
Copy link
Contributor

trieloff commented May 7, 2020

SELECT * FROM (
  SELECT 
    CONCAT('https://', req_http_X_Repo, '-', req_http_X_Owner, '.hlx.page/' ) AS url,
    req_http_X_Owner AS owner, 
    req_http_X_Repo AS repo, 
    COUNT(time_start_usec) AS requests, 
    TIMESTAMP_MICROS(CAST(MIN(time_start_usec) AS INT64)) AS start
  FROM `helix-225321.helix_logging_1McGRQOYFuABWBHyD8D4Ux.requests*`
  GROUP BY req_http_X_Repo, req_http_X_Owner 
)
WHERE 
  requests > 100 AND
  owner != '(null)'
ORDER BY start DESC
LIMIT 100

could be a start, but adding parameters for the date range and the number of sites returned would be nice.

@trieloff trieloff added the enhancement New feature or request label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant