Recent Tags in Android posts by Popularity

0

Please login or register to vote for this query.

(click on this box to dismiss)

All tags in posts tagged with android (or android-*), ordered by number of posts, by posts within last 7 days.

Anime and Manga

Q&A for anime and manga fans

-- Recent Tags in Android posts by Popularity
-- All tags in posts tagged with android (or android-*), ordered by number of posts, by posts within last 7 days.

select t2.TagName, count(p.Id)
from Tags t
--Get all rows of PostTags relation table related to an Android tag
INNER JOIN PostTags pt on pt.TagId = t.Id and t.TagName like '%android%'

--Get all posts in last 5 days with an id in PostTag
INNER JOIN Posts p on pt.PostId = p.Id and DATEDIFF(d, GETDATE(), p.CreationDate) >= -45

--Get all PostTag rows with a postID from the list of posts
INNER JOIN PostTags pt2 on p.Id = pt2.PostID

--get all tags in those postIDs
inner join Tags t2 on pt2.TagId = t2.Id
group by t2.TagName
order by count(t2.TagName) DESC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results