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
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_
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