Obtain the mysql Query summary statement ~

Source: Internet
Author: User
Obtain the mysql Query summary statement ~ The table structure is as follows:
Id uid scroe ------------- 1 1 1.52 1 1.83 2-5.54 3 0.85 2 8.26 1-27 4 38 2 2.3 --------------

Uid is the user id. now you need to query and calculate the total score of each user, which is displayed under the user, that is, the front-end displays similar to this:
User score ------------ 1 1.51 1.81-21 summary 1.32-5.52 8.22 summary 2.32 5.03 summary 0.83 34 Summary 3


Reply to discussion (solution)

Http://sqlfiddle.com /#! 2/8446d2/11

Http://sqlfiddle.com /#! 2/8446d2/11
++

Http://sqlfiddle.com /#! 2/8446d2/11

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.