pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ramakrishnan Muralidharan <ramakrishnanm@pervasive-postgres.com>
To: Dave Roe <davidroe@email.com>
To: pgsql-sql@postgresql.org
Subject: Re: SQL group select question
Date: Tue, 19 Apr 2005 10:33:17 +0530
Message-ID: <02767D4600E59A4487233B23AEF5C59922C28F@blrmail1.aus.pervasive.com> (raw)

Hi,

The following SQL query will fetch you result based on the example given below,

SELECT T.ID , T.VALUE FROM ( SELECT MAX( NUMB ) AS NUMB , NAME  FROM TEST3 GROUP BY NAME ) AS A , TEST3 T
WHERE A.NAME = T.NAME AND A.NUMB = T.NUMB 
ORDER BY T.ID DESC

Regards,
R.Muralidharan




view thread (2+ messages)

Message-ID: <02767D4600E59A4487233B23AEF5C59922C28F@blrmail1.aus.pervasive.com>
Permalink:  ../02767D4600E59A4487233B23AEF5C59922C28F@blrmail1.aus.pervasive.com/
Also on:    postgresql.org/message-id/02767D4600E59A4487233B23AEF5C59922C28F@blrmail1.aus.pervasive.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ramakrishnanm@pervasive-postgres.com, davidroe@email.com
  Subject: Re: SQL group select question
  In-Reply-To: <02767D4600E59A4487233B23AEF5C59922C28F@blrmail1.aus.pervasive.com>
  References: <02767D4600E59A4487233B23AEF5C59922C28F@blrmail1.aus.pervasive.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