Use a subquery: SELECT day, cnt, (@s := @s + cnt) FROM (SELECT day(created_at) as day, count(*) as cnt FROM myTable GROUP BY day(created_at) ) ...
確定! 回上一頁