Aggregates

From: Naz Gassiep <naz(at)mira(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Aggregates
Date: 2007-06-21 11:01:42
Message-ID: 467A5A96.8060009@mira.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
If I have a table with users and a table with messages, is it
possible to have a query that returns user.* as well as one extra column
with the number of messages they have posted and the data and time of
the last message? At the moment I am using a subquery to do this,
however it seems suboptimal. Is there a better way?
- Naz.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-06-21 11:05:10 Re: Accent insensitive search
Previous Message Henka 2007-06-21 10:44:30 8.2.3 PANIC with "corrupted item pointer"