row_number over( partition by xx)

在原始表中 新加一个临时列
去重, 排序

比多次join性能提高很多

http://www.mysqltutorial.org/mysql-window-functions/mysql-row_number-function/

posted @ 2019-07-01 20:31  funny_coding  阅读(1632)  评论(0编辑  收藏  举报
build beautiful things, share happiness