mySQL select and group by values
- by Foo
I'd like to count and group rows by specific values. This seems fairly simple, but I can't seem to do it.
I have a table set up similar to this:
Table: Ratings
id pID uID rating
1 1 2 7
2 1 7 7
3 1 5 4
4 1 1 1
id is the primary key, piD and uID are foreign-keys. Rating contains values between 1 and 10, and only…