Thanks for the quick reply! Simon Davies writes:
> sqlite> select a,b,sum(c),sum(d) from foo group by a,b; > > gives you the data you are after. This could be used to populate > another table via > > sqlite> insert into newFoo select a,b,sum(c),sum(d) from foo group by > a,b; > > Of course, if you can get the data you want from your existing table > using a simple query, you may not actually need a new table.
At the moment I've got a database with values gathered from multiple inputs that generated "duplicate entries" for the "what should be unique" a,b combination. So I was wondering if they could be "easily" merged without creating a new table.
Now I'm going to first copy all unique samples to a new database and then insert the summed values using the given query. But this solution seems a bit awkward, since I'm copying 6 million unique records to a new database and adding a small 22.000 records that are summed. So that's why I was wondering if it could be done in the same table.
I hope my problem is a bit clearer now. Kind regards Daan ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------