按“天”分组统计
select to_char(create_time,'yyyy-mm-dd') as groupColunm from t_ group by groupColunm;
按“周”分组统计
select to_char(create_time,'%Y-%U') as groupColunm from t_ group by groupColunm;
按“月”分组统计
select to_char(create_time,'%Y-%m') as groupColunm from t_ group by groupColunm;
SQL:按天、周、月分组统计
于 2024-06-07 19:48:01 首次发布