如何將以下從屬子查詢更改爲自加入?從屬子查詢自加入
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;
是啊,把我的意見了。 SRY。 – 2009-08-20 15:48:06