Consider the following table:
Im looking for a query that will:
- Count the number of times each members name appears in the table
where tournament= "EPL" AND round ="12"
For this EXAMPLE the query should return:
Andrew = 3 Wins
Joseph = 2 wins
John = 1 win
Martin = 1 Win
I thought about just using a simple count query as in:
Select count(winning_member) as nrWins WHERE tournament="EPL" and round="12" and winning_member = '$mem_name'
But this will result in me having to loop over ALL users, which is not an option.
Im completely stuck on this problem...Any input will be much appreciated