Basic SQL question and kudos

From: Dennis Gearon <gearond(at)sbcglobal(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Basic SQL question and kudos
Date: 2010-10-05 16:31:55
Message-ID: 917399.21892.qm@web82107.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I need to get a join across about 8 tables to only return rows for the MAX date in one of the tables for all otherwise identical return results. I am trying to get the most recent edit of normalized records that are composed of elements from all the tables. There could be 1 to 100+ successive edits to the normalized/multi table record. The will be approximately 65,000 total records for now, 100,000,000s later.

If I make one of the values in the select statement be MAX(the date), does that automatically do grouping on 'the date' or will I only get ONE row total returned?

KUDOS, I almost never need to write the postgres group . . . because it just works. It's only using postgres that I ever even read the digest that I receive.

Soon I will have to write more to get performance tips. You guys are great on this list and seem to always have answers, Thx.
Dennis Gearon

Signature Warning
----------------
EARTH has a Right To Life,
otherwise we all die.

Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-10-05 16:35:50 Re: psql \q hang
Previous Message Massa, Harald Armin 2010-10-05 16:15:07 Re: querying the version of libpq