The most popular tag of user from Russia with the maximum reputation

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

with russianUsers as (select * from users where lower(location) like '%russia%'),
     userId as (select id from russianUsers where reputation = (select max(reputation) from russianUsers)),
     idAnswer as (select id from posttypes where name='Answer'),
     answers as (select * from posts where PostTypeid=(select * from idAnswer) and owneruserid=(select * from userId)),
     postids as (select id from posts where Id in (select parentid from answers)),
     tagsmy as (select * from posttags where postid in (select * from postids)),
     groupedTags as (select tagid, count(tagId) as tagCount from tagsmy group by tagid),
     populartagId as (select tagid from groupedTags where tagCount=(select max(tagCount) from groupedTags))
     
--https://stackoverflow.com/users/55159/quassnoi?tab=tags
--select TagName
--from Tags
--where Id=(select * from populartagid)
select tagName, tagcount
from groupedtags gt
join Tags on tags.id=gt.tagid
order by tagcount desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results