一个注意事项:
select
substr(count(1)/7,1,3)
count(1)/7
from
tb_tmp_1d
where cast(event_day as DATE ) between '20200320' and date_add('20200320' , interval 1 day );
//此处 date_add('20200320' , interval 1 day ) 不能有空格
一个注意事项:
select
count(1)/7
from
tb_tmp_1d
where cast(event_day as DATE ) between '20200320' and date_add('20200320' , interval 1 day );
//此处 date_add('20200320' , interval 1 day ) 不能有空格
本文标题:2020-11-13-Mysql(做习题遇到的问题)
本文链接:https://www.haomeiwen.com/subject/ggrvbktx.html
网友评论