Re: [SQL] Aggregate query for multiple records

2004-08-28 Thread Scott Gerhardt
Greg Stark <[EMAIL PROTECTED]> writes: [ nice example snipped ] ... Also, you'll have to change it to use reals. That part, at least, can be worked around as of 7.4: use polymorphic functions. You can declare the functions and aggregate as working on anyelement/anyarray, and then they will automa

[SQL] Aggregate query for multiple records

2004-08-25 Thread Scott Gerhardt
Hello, I am new to the list, my apology if this question is beyond the scope or charter of this list. My questions is: What is the best method to perform an aggregate query to calculate sum() values for each distinct wid as in the example below, but except for all wid's (not just WHERE wid='01/