Re: [GENERAL] Feature Request, aggregate functions distinct on

2011-04-26 Thread Rob Sargent
On 04/26/2011 04:33 PM, Tom Lane wrote: luda posch writes: I am not an expert on the official sql spec, but I think it would be useful if distinct on() could be used within an aggregate when supplied with another column name. For example: select sum(distinct on(id) order_price) from order

Re: [GENERAL] Feature Request, aggregate functions distinct on

2011-04-26 Thread Tom Lane
luda posch writes: > I am not an expert on the official sql spec, but I think it would be useful > if distinct on() could be used within an aggregate when supplied with > another column name. For example: > select sum(distinct on(id) order_price) from order_table; > select sum(distinct on(email_

[GENERAL] Feature Request, aggregate functions distinct on

2011-04-26 Thread luda posch
I have used and it is quite useful the 'distinct' keyword within aggregate functions. I am not an expert on the official sql spec, but I think it would be useful if distinct on() could be used within an aggregate when supplied with another column name. For example: select sum(distinct on(id) ord