Environment Description :
- WINDOWS10 Professional Edition 64-bit
- MySQL5.7.20
the - the first basic operation of the year star MySQL tutorial P65
Original:
Practice content:
The above SQL statement did not get the corresponding result. cannot be used to query the highest-paid members of each department.
Try
Perform order BY and group by queries separately
It seems that the data in the table obtained by the ORDER by subquery does not work in an external query.
The execution order of the relevant group by and order by is queried, and the corresponding results are not obtained.
Guess:
is not because of the use of 5.7 of MySQL, and the previous access is relatively large.
And then I finally got a look at!!!!!!!.
Reference: https://jingyan.baidu.com/article/4ae03de3df93cc3eff9e6b37.html
Workaround for Mysql5.7 neutron query when order by is combined with GROUP by