Re: [SQL] update with multiple fields as aggregates

2008-05-03 Thread Volkan YAZICI
On Sat, 3 May 2008, Alexy Khrabrov <[EMAIL PROTECTED]> writes: > I need to fill two columns of a Rats table from an Offset1 table, > where for each Id row in Rats we need to fill an average offset and > the sum of all offset from Offset1 with the same Id. I can create a > derivative table like thi

[SQL] update with multiple fields as aggregates

2008-05-03 Thread Alexy Khrabrov
I need to fill two columns of a Rats table from an Offset1 table, where for each Id row in Rats we need to fill an average offset and the sum of all offset from Offset1 with the same Id. I can create a derivative table like this: create table ofrats as (select customer_id as cid,avg(o),sum