Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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