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