Skip to content

Instantly share code, notes, and snippets.

@stevecondylios
Last active November 20, 2022 16:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stevecondylios/ff427131bad68a30dca25dd6b0b8d387 to your computer and use it in GitHub Desktop.
Save stevecondylios/ff427131bad68a30dca25dd6b0b8d387 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