SELECT user.styleid, COUNT(user.styleid) AS total, style.title FROM user LEFT OUTER JOIN style ON style.styleid = user.styleid WHERE user.styleid <> 0 GROUP BY styleid ORDER BY total