mysql
m0_37891495
这个作者很懒,什么都没留下…
展开
-
(转) MySQL统计函数记录——按月、按季度、按日、时间段统计
按年汇总,统计:select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by date_format(col, '%Y');按月汇总,统计:select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by da...转载 2019-06-13 07:00:59 · 303 阅读 · 0 评论 -
mysql-Every derived table must have its own alias
SELECT `时间`,count(`时间`) FROM (SELECT DISTINCT `订单编号`,`时间` from `零售` where `订单编号` not like '%C%') GROUP BY `时间`;运行语句时,提示错误:[Err] 1248 - Every derived table must have its own alias一般出现在嵌套语句中,为派生...原创 2019-06-20 07:10:49 · 397 阅读 · 0 评论