At 2:32 AM +0100 6/18/01, <[EMAIL PROTECTED]> wrote:
>I need some help with a query to sum data for each id and write it into a
>new table.
>
>I have a source data table for each calendar month containing i.d.'s (not
>unique) and a value and I need to sum all the values for each i.d. for all
>months into a new table (where each i.d. will now be unique).

Sounds like you need to combine 12 separate tables into a single table
that has an additional column to indicate which month each row is for.
Then you should be able to sum the values easily.  Trying to do this
for bunch of separate tables will be difficult - many queries.

>
>The only way I could see of doing it was in two or more stages?
>
>Duncan


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to