赞
踩
知识点回顾:union all和union的区别
( select name as results from MovieRating MR left join Users U on MR.user_id = U.user_id group by MR.user_id order by count(*) desc, name asc limit 1 ) union all ( select title from MovieRating MRR left join Movies M on MRR.movie_id = M.movie_id where created_at between '2020-02-01' and '2020-02-29' group by MRR.movie_id order by avg(rating) desc, title asc limit 1 )
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。