由于我司提供的工具周期只有天,周这种。于是想用周期为天来执行脚本。逻辑如下:
select
day,
count(*)
from test
where
( ‘20191215’ = ‘date’ and day>=‘20191201’ and day<=‘20191215’)
or
(‘20200101’ = ‘date’ and day>=‘20191215’ and day<‘20200101’)
group by day
SQL16号统计1~15号数据,1号统计上月15~月底数据
最新推荐文章于 2022-03-23 11:27:48 发布
1万+

被折叠的 条评论
为什么被折叠?



