Mysql 統計每日註冊人數和累計註冊人數

sql 語句以下:sql   SET @i = 0; SELECT  cc.* ,(@i:=@i+cc.當日註冊人數) as 累計註冊人數 FROM   (SELECT DATE_FORMAT(create_time,'%Y-%m-%d') as "日期" , count(*) as "當日註冊人數" FROM user_t GROUP BY  日期)cc   CROSS JOIN (select
相關文章
相關標籤/搜索