Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Aggregates


  • From: Naz Gassiep <naz(at)mira(dot)net>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: Aggregates
  • Date: Thu, 21 Jun 2007 13:01:42 +0200
  • Message-id: <467A5A96(dot)8060009(at)mira(dot)net>

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.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group