Q&A for professional and enthusiast programmers
SELECT date1, count(id) as cnt FROM ( select Posts.Id, ViewCount, FORMAT (Posts.CreationDate, 'yyyy') as [date1] from Posts join PostTags on Posts.Id = PostTags.PostId join Tags on Tags.Id = PostTags.TagId AND Tags.TagName = 'php' where PostTypeId = 1 ) as t1 group by date1 order by date1