目录
0 需求描述
2 数据准备
3 问题分析
4 小结
0 需求描述
-- 按照 日期,省份,等级 分组 求分数的平均值;但是需要剔除当前行的数据
2 数据准备
create table avgtest as (
select '2024-10-24' as cdate, '广东' as province,'深圳' as city, '2' as level, 200 as score
union all
select '2024-10-24' as cdate, '广东' as province,'广州' as city, '3' as level, 300 as score
union all
select '2024-10-24' as cdate, '广东' as province,'湛江' as city, '4'