我有这个查询:
SELECT gamer_id,COUNT(*) AS sum, SUM(amount) as amount
FROM sales_list
WHERE rdate BETWEEN '2012-04-01' AND '2012-04-30' AND gamer_id NOT IN
(SELECT gamer_id FROM sales_list WHERE rdate < '2012-04-01' GROUP BY gamer_id)
GROUP BY gamer_id
这个查询打印了“2”个结果,而我只看到了“1”。
我有 1 个玩家在 4 月份存款 2 次,我不想计算总存款只是为了计算存款的总玩家。
有什么建议吗?