pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robins Tharakan <robins.tharakan@comodo.com>
To: pgsql-sql@postgresql.org
Cc: Tarlika Elisabeth Schmitz <postgresql6@numerixtechnology.de>
Subject: Re: GROUP and ORDER BY
Date: Tue, 08 Nov 2011 20:33:18 +0530
Message-ID: <4EB944B6.7030905@comodo.com> (raw)
In-Reply-To: <20111108095958.2b6f3ad9@dick.coachhouse>
References: <20111107212031.4d6310aa@dick.coachhouse>
	<4EB8AF9C.7060305@comodo.com>
	<20111108095958.2b6f3ad9@dick.coachhouse>

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.



view thread (4+ messages)

Message-ID: <4EB944B6.7030905@comodo.com>
Permalink:  ../4EB944B6.7030905@comodo.com/
Also on:    postgresql.org/message-id/4EB944B6.7030905@comodo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: robins.tharakan@comodo.com, postgresql6@numerixtechnology.de
  Subject: Re: GROUP and ORDER BY
  In-Reply-To: <4EB944B6.7030905@comodo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox