so i've got a table that looks something like this:
+-------+---------+---------+---------+| NAME | FIELD_1 | FIELD_2 | FIELD_3 |+-------+---------+---------+---------+| BOB | 1 | 1 | 1 |+-------+---------+---------+---------+| BOB | 2 | 2 | 2 |+-------+---------+---------+---------+| SAM | 3 | 3 | 3 |+-------+---------+---------+---------+| SAM | 4 | 4 | 4 |+-------+---------+---------+---------+| JOE | 5 | 5 | 5 |+-------+---------+---------+---------+| JOE | 6 | 6 | 6 |+-------+---------+---------+---------+
+-------+---------+---------+---------+| NAME | FIELD_1 | FIELD_2 | FIELD_3 |+-------+---------+---------+---------+| BOB | 3 | 3 | 3 |+-------+---------+---------+---------+| SAM | 7 | 7 | 7 |+-------+---------+---------+---------+| JOE | 11 | 11 | 11 |+-------+---------+---------+---------+
4/10/2006 10:39:27 PM
in the sql query, use a select sum() and group byie.SELECT SUM(field_1), SUM(field_2), SUM(field_3)GROUP BY name;then printout the results generated from this querynote: this is pseudocode. i have no clue if the syntax is correct[Edited on April 11, 2006 at 1:14 AM. Reason : .]
4/11/2006 1:13:47 AM