Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save subratrout/3fd88f2f90e662a450d2b12b7019ec26 to your computer and use it in GitHub Desktop.
Save subratrout/3fd88f2f90e662a450d2b12b7019ec26 to your computer and use it in GitHub Desktop.
Query for the Stack Exchange Data Explorer https://data.stackexchange.com/stackoverflow/query/new
SELECT
'https://stackoverflow.com/questions/' + CONVERT(VARCHAR, Posts.Id) as url,
(
ViewCount / (SELECT -DATEDIFF(DAY, GETDATE() , CreationDate))
) AS ave_views_per_day,
*
FROM
Posts
LEFT JOIN PostTags ON Posts.Id = PostTags.PostId
LEFT JOIN Tags ON PostTags.TagId = Tags.Id
WHERE TagName IN ('google-bigquery')
AND ViewCount > 10000 -- set to some sensible value
-- ORDER BY ave_views_per_day DESC
ORDER BY Score DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment