SELECT a.day,a.product,a.pv,a.id from
(SELECT day, product,id,pv from
(SELECT id ,product, day ,pv ,create_time, row_number() OVER (PARTITION BY day ORDER BY pv desc) rn
FROM active_work_detail_model
WHERE (create_time>='2021-12-01 15:33:41' AND create_time<='2022-01-11 23:59:59')
group by id ,product, day,create_time,pv)
where rn<=10
GROUP BY id,product, day,pv) as a
join
(SELECT id,publish_time,new_platform from work_basic_model
where (publish_time>='2021-06-01 00:00:00')
GROUP BY id,publish_time,new_platform ) AS b
on a.id=b.id
where b.new_platform='APP'
and a.product='tracker_view'
group by a.day,a.product,a.pv,a.id
order by a.day desc, a.pv desc
你先说遇到什么问题了呀?