How do I change the following dependent subquery to self join?
SELECT d.name, d.created,
(SELECT SUM( q1.payout ) FROM client AS q1 WHERE q1.uid = d.uid) AS payout,
(SELECT COUNT( q2.uid ) FROM client AS q2 WHERE q2.uid = d.uid AND q2.winning =1) AS cnt
FROM client AS d group by d.name, d.created ORDER BY cnt DESC LIMIT 0 , 10;