如何提高下面语句的效率select * from(select a_month ,b_name ,count(DISTINCT a.c_no) ,dense_rank() over (partition by a_month order by COUNT( DISTINCT a.c_no) desc) rank fromsut_s aleft join cou_c bon a.ll=b.ll where a_month>='10'group by b_
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/18 08:13:13
如何提高下面语句的效率select * from(select a_month ,b_name ,count(DISTINCT a.c_no) ,dense_rank() over (partition by a_month order by COUNT( DISTINCT a.c_no) desc) rank fromsut_s aleft join cou_c bon a.ll=b.ll where a_month>='10'group by b_
如何提高下面语句的效率
select * from
(
select a_month ,b_name ,count(DISTINCT a.c_no) ,
dense_rank() over (partition by a_month order by COUNT( DISTINCT a.c_no) desc) rank from
sut_s a
left join
cou_c b
on a.ll=b.ll
where a_month>='10'
group by b_name,a_month
)where rank
如何提高下面语句的效率select * from(select a_month ,b_name ,count(DISTINCT a.c_no) ,dense_rank() over (partition by a_month order by COUNT( DISTINCT a.c_no) desc) rank fromsut_s aleft join cou_c bon a.ll=b.ll where a_month>='10'group by b_
select a_month ,b_name ,count(DISTINCT a.c_no) ,
dense_rank() over (partition by a_month order by COUNT( DISTINCT a.c_no) desc) rank from
sut_s a
left join
cou_c b
on a.ll=b.ll
where a_month>='10'
group by b_name,a_month
having dense_rank() over (partition by a_month order by COUNT( DISTINCT a.c_no) desc)