I 'd like to ask a question about the summary of mysql queries.

Source: Internet
Author: User
I still want to ask a summary question for mysql Query summary. This post was last edited by setoy from 2013-12-1818: 11: 02 for five people, and the uid is 1 ~ 5. there is a score table for these five people (a person may not receive a score) id & nbsp; uid & nbsp; scroe --------- ask a summary question about mysql Query summary.
At the end of this post, five people were edited by setoy at 18:11:02 on, and the uid was 1 ~ 5
There is a score table for these five people (one person may not have scored)
id  uid  scroe
-------------
1    1    1.5
2    1    1.8
3    2    -5.5
4    1    0.8
5    2    8.2
6    1    -2
7    4    3
8    2    2.3
--------------


Now we want to count the scores of all of them. even if we cannot find a person's score, we need to display 0 points. The Display format is as follows:
User Score Summary
-----------------------
1 1.5 2.1
1 1.8 2.1
1 0.8 2.1
1-2 2.1
2-5.5 5
2 8.2 5
2 2.3 5
3 0 0
4 3 3
5 0 0
Share: More

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.