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