|
@@ -30,18 +30,20 @@ class MemberController
|
|
|
SELECT t1.month, t1.member_count,
|
|
|
SUM(t2.member_count) AS member_month_count
|
|
|
FROM (
|
|
|
- SELECT DATE_FORMAT(FROM_UNIXTIME(member_addtimes), '%Y/%m') AS month,
|
|
|
+ SELECT DATE_FORMAT(FROM_UNIXTIME(member_addtimes), '%Y%m') AS month,
|
|
|
COUNT(member_id) AS member_count
|
|
|
FROM app_member
|
|
|
WHERE member_mobile != '0000'
|
|
|
GROUP BY month
|
|
|
+ ORDER BY month ASC
|
|
|
) t1
|
|
|
JOIN (
|
|
|
- SELECT DATE_FORMAT(FROM_UNIXTIME(member_addtimes), '%Y/%m') AS month,
|
|
|
+ SELECT DATE_FORMAT(FROM_UNIXTIME(member_addtimes), '%Y%m') AS month,
|
|
|
COUNT(member_id) AS member_count
|
|
|
FROM app_member
|
|
|
WHERE member_mobile != '0000'
|
|
|
GROUP BY month
|
|
|
+ ORDER BY month ASC
|
|
|
) t2 ON t1.month >= t2.month
|
|
|
GROUP BY t1.month;
|
|
|
");
|