0
在我的SQl服務器Sp。修改SP的輸出
`SELECT rating as [Rating],count(id) as [RatingCount]
FROM MMBPollResults
where mmb_id = @MMbid
GROUP BY rating
This SP returns the rating for each user.
i:e rating ratingcount
` 1 2
2 1
5 4
因此,這意味着
2users have rated the transaction with 1star
1 user has rated the transaction with 2stars
4 users have rated the transaction with 5stars
這是我所需要的輸出
rating ratingcount
` 1 2
2 1
3 0
4 0
5 4
對不起,如果這是一個愚蠢的問題 感謝 孫
是什麼在MMBPollResults的數據是什麼樣子?你有沒有一個查找表的所有可能的收視率? –