select count(1) from ( select *,
row_number() over (partition by user_id,city_id,job_type_id order by score desc )
rank from tablename where dt=20190114 order by score desc ) a where a.rank<=1;
hive让表中的数据去重
最新推荐文章于 2024-01-04 15:31:04 发布
select count(1) from ( select *,
row_number() over (partition by user_id,city_id,job_type_id order by score desc )
rank from tablename where dt=20190114 order by score desc ) a where a.rank<=1;