当前位置:Gxlcms > 数据库问题 > mysql排序row_number

mysql排序row_number

时间:2021-07-01 10:21:17 帮助过:3人阅读

select ‘top3‘ as top,news_id,count(1) as counts from (
SELECT
news_id,
pv,
row_number () over (
PARTITION BY statis_date
ORDER BY
pv DESC
) row_num
FROM
author_pv
WHERE
statis_date = ‘${yesterday}‘ and settle_type=2)t1 where t1.row_num between 41 and 60 group by news_id

mysql排序row_number

标签:mys   nts   tis   day   sele   from   排序   where   log   

人气教程排行