SELECT tid, tagname FROM pc_tagdata as tg left join pc_pc_soft_thread as st on st.tid=tg.tid WHERE tg.tagid='52987' group by st.catid, st.softname