row_number over( partition by xx)
在原始表中 新加一个临时列
去重, 排序
比多次join性能提高很多
![](https://img2018.cnblogs.com/blog/1281466/201907/1281466-20190701203043961-957616840.png)
http://www.mysqltutorial.org/mysql-window-functions/mysql-row_number-function/
@@@build beautiful things, share happiness@@@
在原始表中 新加一个临时列
去重, 排序
比多次join性能提高很多
http://www.mysqltutorial.org/mysql-window-functions/mysql-row_number-function/