SQL problem

From: Salvador Mainé <salvamaine(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL problem
Date: 2001-03-07 14:23:23
Message-ID: 3AA6445B.F409966F@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello:

I have a table with pluviometrical data

meteo (rain float, day date)

I want to select the the day of maximum value for each year.It should be
something like :

select max(rain),day from meteo group by date_part('year', day);

but it obiously doesn't work.
I thought of doing it with aggregates, but it's far too complicated. Is
there an 'easy' way to do this?

--
Salva

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Karel Zak 2001-03-07 14:28:29 Re: sql functions and triggers
Previous Message Thomas Lockhart 2001-03-07 14:14:37 Re: No Documentation for to_char(INTERVAL, mask)