Re: GROUP and ORDER BY - Mailing list pgsql-sql

From Robins Tharakan
Subject Re: GROUP and ORDER BY
Date
Msg-id 4EB944B6.7030905@comodo.com
Whole thread Raw
In response to Re: GROUP and ORDER BY  (Tarlika Elisabeth Schmitz <postgresql6@numerixtechnology.de>)
List pgsql-sql
Hmmm... Missed that!

I think you are looking for the feature that was introduced in 
PostgreSQL 9.1 where you could have a non-group-by column in the select 
list, but only if the group-by has a pkey to identify the actual row.

http://www.postgresql.org/docs/9.1/static/release-9-1.html
(Search for GROUP BY)

--
Robins Tharakan

On 11/08/2011 03:29 PM, Tarlika Elisabeth Schmitz wrote:
> Thank you for yuor suggestion, Robins. Unfortunately, it does not work;
> this returns:
> 1787    "Toomyvara"    0.5
> 1787    "Toomevara"    0.4
> 1188    "Toonybara"    0.4
> because while column "no" is identical, "name" isn't and you're
> grouping by both of them.


pgsql-sql by date:

Previous
From: tlund79
Date:
Subject: Issue with a variable in a function
Next
From: Sylvain Mougenot
Date:
Subject: Re: Partitionning + Trigger and Execute not working as expected