select 查出来的数据是这个
sdkversion sdate usercount pushcount newcount
------------ -------- --------- --------- ----------
201602201850 20160917 144 314 36
201602231924 20160917 313 788 71
201602291755 20160917 56 1839 9
201603012016 20160917 733 2132 199
201603071410 20160917 258 723 53
201603091641 20160917 924 3420 96
201603141433 20160917 12 31 2
201603142102 20160917 1176 3879 116
201603180826 20160917 4 8 0
201603181035 20160917 720 2755 57
201603211419 20160917 13 38 1
201603211650 20160917 575 2006 57
201603221959 20160917 1521 6053 100
整个数据查询是这样的
INSERT INTO t_engine_sdk_user_report(sdkversion, sdate, usercount, pushcount, newcount)
(SELECT aa.sdkversion,CONCAT('20160917') AS sdate,usercount,COUNT(b.userid) AS pushcount, COUNT(CASE b.regedit WHEN 1 THEN userid END) AS newcount FROM
t_engine_sdk_user_log_20160917 AS b
INNER JOIN (SELECT a.sdkversion, COUNT(a.userid) AS usercount FROM
(SELECT VERSION AS sdkversion,userid FROM
t_engine_sdk_user_log_20160917 GROUP BY userid) AS a GROUP BY a.sdkversion) AS aa ON b.`VERSION`= aa.sdkversion
GROUP BY b.VERSION)
就是查数据在插入另外个表,
错误代码: 1292
Truncated incorrect INTEGER value: '00000000-0678-bf88-0a3b-cba100000000'
就报错了,查了一下,不知道怎么就报错了呢,求大神告诉下!555555555
没看到有values呀,insert语句不是应该这样写的吗:
INSERTINTOtable_name(column1,column2,...)values(..,..,....)
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。