Group by SQL with count
- by snorlaks
Lets say we have got rows like that:
MyTable
ID Name Product
1 Adam x
2 Adam y
3 Adam z
4 Peter a
5 Peter b
Using query like:
Select Name, Count(Product) from MyTable
group by Name
results will be:
Adam 3
Peter 2
But I would like results like:
1 Adam x 3
2 Adam y 3
3 Adam z 3
4 Peter a 2
5 Peter b 2
I hope Ypu know what I mean
Could You help me with that query,
thanks for help,
Bye