SELECT DISTINCT h.h1_id FROM table h LEFT JOIN table ph ON h.h1_id = ph.h1_id WHERE isNULL( ph.id ) group by h2_id order by count(h.h1_id) desc
Followers
Monday, 30 March 2015
Combination of distinct, select join gorupby orderby isNULL
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment