Workaround for Mysql5.7 neutron query when order by is combined with GROUP by

Source: Internet
Author: User
Tags mysql tutorial

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.