I have a table:
uid_from uid_to count
x1 x2 3
x3 x2 5
x8 x1 99
x9 x1 1
And would like to generate a summ table like this:
uid_to sum
x1 100
x2 8
I can do it in PHP, but would rather do it directly in a MySQL query. I should note the table has 700 Million rows.