![]() |
| |||
| Hi, I have a database where I have to find the summation of points for each person. The example below has the name repeating multiple times. I am new to mysql. Would you please let me know what query would be good for getting what I want? The sample is below. Thanks: Name | Points Jack 10 Mack 20 Jack 25 Jack 25 Mack 30 John 5 Jack 10 John 10 John 5 Jill 10 John 30 Jill 10 |
| |||
| premgrps@gmail.com wrote: > Hi, > I have a database where I have to find the summation of points for > each person. The example below has the name repeating multiple times. > I am new to mysql. Would you please let me know what query would be > good for getting what I want? The sample is below. > > Thanks: > > Name | Points > Jack 10 > Mack 20 > Jack 25 > Jack 25 > Mack 30 > John 5 > Jack 10 > John 10 > John 5 > Jill 10 > John 30 > Jill 10 SELECT name, sum(points) from mytable group by name |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |