Created
January 26, 2016 22:00
-
-
Save spara/420619eff3a19519a283 to your computer and use it in GitHub Desktop.
query stackexchange data explorer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select [Month], Title, id, [link], ViewCount, Score from | |
( | |
select CAST( | |
cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01' | |
as datetime) [Month], | |
Title, | |
p.Id, | |
'https://stackoverflow.com/questions/' + CAST(p.Id AS nvarchar) [link], | |
ViewCount, | |
Score | |
from Posts p | |
join PostTags pt on pt.PostId = p.Id | |
join Tags t on t.Id = pt.TagId | |
where TagName LIKE '%kubernetes%' | |
-- and CreationDate >= convert(datetime, 'Jan 08 2016') | |
group by p.id, p.CreationDate, Title, ViewCount, Score | |
) as X | |
order by [Month] asc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment