pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Claudia Kosny <ckosny@gmx.net>
To: pgsql-sql@postgresql.org
Subject: fetch first rows of grouped data
Date: Mon, 27 Aug 2007 18:36:47 +0200
Message-ID: <46D2FD9F.3020000@gmx.net> (raw)

Hi there

I have a list of events that take place in a certain city at a certain 
date. Now I would like to have the first two (ordered by date) events 
for each city.

Is there a way to do this with one query?
I am using PostgreSQL 7.4.

Thanks for any tips.

Claudia





view thread (9+ messages)  latest in thread

Message-ID: <46D2FD9F.3020000@gmx.net>
Permalink:  ../46D2FD9F.3020000@gmx.net/
Also on:    postgresql.org/message-id/46D2FD9F.3020000@gmx.net

 · 

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: ckosny@gmx.net
  Subject: Re: fetch first rows of grouped data
  In-Reply-To: <46D2FD9F.3020000@gmx.net>

* 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