michaelespinosa
01-20-2010, 11:25 PM
I have a bunch of data in a table that I'm trying to simplify.
What I have:
A table with that holds values name, address, amount.
Jerry Jones, 123 Main Street Sunnyville CA 90210, 10
Jerry Jones, 123 Main Street Sunnyville CA 90210, 15
Jerry Jones, 123 Main Street Sunnyville CA 90210, 12
Jerry Jones, 123 Main Street Sunnyville CA 90210, 13
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 14
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 8
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 10
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 15
What I want:
The table to reflect the person only once, total the amounts, and count the number of instances.
Jerry Jones, 123 Main Street Sunnyville CA 90210, 50, 4
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 47, 4
I have added the two additional fields to the table (total_amount and num_inst)
I'm just not sure how to go about it.
Thanks in advance for any help.
What I have:
A table with that holds values name, address, amount.
Jerry Jones, 123 Main Street Sunnyville CA 90210, 10
Jerry Jones, 123 Main Street Sunnyville CA 90210, 15
Jerry Jones, 123 Main Street Sunnyville CA 90210, 12
Jerry Jones, 123 Main Street Sunnyville CA 90210, 13
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 14
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 8
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 10
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 15
What I want:
The table to reflect the person only once, total the amounts, and count the number of instances.
Jerry Jones, 123 Main Street Sunnyville CA 90210, 50, 4
Marry Hues, 456 Lowe Drive Cloudyway CA 90120, 47, 4
I have added the two additional fields to the table (total_amount and num_inst)
I'm just not sure how to go about it.
Thanks in advance for any help.