Re: How to obtain the maximum value of a date, between 3 tables...

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to obtain the maximum value of a date, between 3 tables...
Date: 2010-12-17 03:57:41
Message-ID: ieen3l$j8e$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2010-12-08, Andre Lopes <lopes80andre(at)gmail(dot)com> wrote:
> --20cf3043476e053b5f0496e5ebc4
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I need to obtain the maximum value of a date, but that comparison will be
> made between 3 tables... I will explain better with a query...

you probably want
greatest(d1,d2,d3)
or possibly
max(greatest(d1,d2,d3))

--
⚂⚃ 100% natural

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2010-12-17 04:27:09 Re: if-clause to an exiting statement
Previous Message Ray Stell 2010-12-17 01:40:22 Re: PANIC: ERRORDATA_STACK_SIZE exceeded