Apologies if I'm not explaining my situation in perfect detail as I'm not a native speaker. I'm sure this is fairly simple for most people, but I struggle with it. I'm using php/mysql.
Suppose I have a database as follows:
id game scorer
1 1 molly
2 1 sarah
3 1 angela
4 1 molly
5 2 jane
6 2 molly
7 2 sarah
How would I write a query to present the scorers for each game with the number of goals they have scored during the season up until that particular goal?
Example:
Game 1: Molly (1st), Sarah (1st), Angela (1st), Molly (2nd)
Game 2: Jane (1st), Molly (3rd), Sarah (2nd)