数据库|mysql教程
mysql
sql
oracle
数据库-mysql教程
mysqlsqloracle
免费收录网源码,ubuntu找不到套件,爬虫python抓取链接,vertica php,首页随机SEOlzw
SELECT
CREATE_DATE,
SUM(ISBIND) AS ISBIND,
SUM(UNBIND) AS UNBIND,
SUM(SUBSCRIBE) AS SUBSCRIBE,
SUM(UNSUBSCRIBE) AS UNSUBSCRIBE
FROM
(
SELECT
N.CREATE_DATE,
MAX(
CASE N.EVENT
WHEN ‘subscribe’ THEN
COUNT
ELSE
0
END
) SUBSCRIBE,
MAX(
CASE N.EVENT
WHEN ‘unsubscribe’ THEN
COUNT
ELSE
0
END
) UNSUBSCRIBE,
0 ISBIND,
0 UNBIND
FROM
(
SELECT
C.CREATE_DATE,
C.EVENT
,
COUNT(C.EVENT
) COUNT
FROM
(
SELECT
STR_TO_DATE(X.CREATE_DATE, ‘%Y-%m-%d’) AS CREATE_DATE,
X.EVENT
FROM
TBL_WX_MP_XML_MESSAGE X
WHERE
X.MSG_TYPE = ‘event’
AND X.EVENT
in (‘unsubscribe’,’subscribe’)
) C
GROUP BY
C.CREATE_DATE,
C.EVENT
ORDER BY
C.EVENT
) AS N
WHERE
N.CREATE_DATE IS NOT NULL
GROUP BY
N.CREATE_DATE
UNION
SELECT
*
FROM
(
SELECT
B.BINDTIME AS CREATE_DATE,
0 AS SUBSCRIBE,
0 AS UNSUBSCRIBE,
MAX(
CASE B.ISBIND
WHEN 1 THEN
B.COUNT
ELSE
0
END
) ISBIND,
MAX(
CASE B.ISBIND
WHEN 0 THEN
B.COUNT
ELSE
0
END
) UNBIND
FROM
(
SELECT
STR_TO_DATE(U.BINDTIME, ‘%Y-%m-%d’) AS BINDTIME,
U.ISBIND,
COUNT(U.ISBIND) COUNT
FROM
tbl_wx_mp_user u
WHERE
U.ISBIND IS NOT NULL
GROUP BY
STR_TO_DATE(U.BINDTIME, ‘%Y-%m-%d’),
U.ISBIND
) B
GROUP BY
B.BINDTIME
) B
) A
WHERE
1 = 1
AND A.CREATE_DATE >= STR_TO_DATE(‘-12-11’, ‘%Y-%m-%d’)
h5拼图源码有计时,ubuntu默认镜像源,tomcat8连接池配置,爬虫用什么主机,php程序员学习计划外包,seo设置滤波lzw
AND STR_TO_DATE(A.CREATE_DATE, \%Y-%m-%d) <= STR_TO_DATE(-12-17, \%Y-%m-%d) GROUP BY A.CREATE_DATE ORDER BY A.CREATE_DATE DESC
快就微信 源码,阿里云配置vscode,ubuntu 测试mic,tomcat的关闭重启,爬虫jieba,兄弟连php pdf,兰溪关键词seo,网站批量打印源代码,个人企业模板网站lzw