I currently have a table that looks something like this:
+------+-------+------------+------------+
| id | rate | first_name | last_name |
+------+-----
select sum (rate)
from yourTable
group by first_name, last_name
Edit
If you want to get all sum of those little "sums
", you will get a sum of all table..
Select sum(rate) from YourTable
but, if for some reason are differents (if you use a where
, for example)
and you need a sum for that select above, just do.
select sum(SumGrouped) from
( select sum (rate) as 'SumGrouped'
from yourTable
group by first_name, last_name) T1