mysql 排序order by可以根據權重,進行表達式計算。再排序


1.select * from tbl_actor order by (follower_count+Recommend_weight)*weight_ratio desc limit 3;

2.order by (follower_count+Recommend_weight)*weight_ratio

3.可用於根據權值,做推薦列表用。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM