我跑出来的 pv 是区间的 pv ,但是我想要的是全部时间范
sql吧
全部回复
仅看楼主
level 1
方plus✆ 楼主
我跑出来的 pv 是区间的 pv ,但是我想要的是全部时间范围内的 pv ,而排序想按照区间时段进行排序。。。但是,不知道咋改。。。
select title,
url_token,
pv,
concat_ws('-',p_year,p_month,p_day)
from dw_content_question.dw_question_pd_info
where concat_ws('-',p_year,p_month,p_day) between'${day1}' and '${day2}'
order by pv desc
limit 20
2020年02月08日 11点02分 1
1