Q&A for students and teachers of all martial arts
select [tag row], [python], [pandas], [sql] from ( select ptl.postid, trow.tagname [tag row], tcol.tagname [tag col] from posttags ptl inner join tags trow on trow.id = ptl.tagid inner join posttags ptr on ptr.postid = ptl.postid inner join tags tcol on tcol.id = ptr.tagid ) data pivot ( count(postid) for [tag col] in ([python], [pandas], [sql]) ) pvt order by 2 desc