时间:2021-07-01 10:21:17 帮助过:4人阅读
select DATE_FORMAT(DATE_FORMAT(DATADATE,‘%Y-%m-%d‘),‘%Y%u‘) as NAME,SUM(PAPR) VALUE from DWD_CST_MPDAYREAD
WHERE DATE_FORMAT(DATE_FORMAT(DATADATE,‘%Y-%m-%d‘),‘%Y%u‘) BETWEEN 202011 and 202016
group by NAME;
MYSQL处于yyyyMMdd类型的日期实现按周统计查询
标签:实现 date ada name mys sele _for from group by