一个注意事项: 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 ) 不能有空格