Q&A for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO
-- Top users by tag select u.id as [User Link] , sum(p.score) [Total] , sum(case when p.posttypeid = 1 then p.score else null end) [Total Q] , sum(case when p.posttypeid = 2 then p.score else null end) [Total A] , count(*) [# posts] from users u inner join posts p on p.owneruserid = u.id inner join posts q on q.id = nullif(p.parentid, p.id) inner join posttags pt on pt.postid = q.id inner join tags t on t.id = pt.tagid and t.tagname = 'iOS' group by u.id order by sum(p.score) desc