Re: How to obtain the maximum value of a date, between 3 tables... - Mailing list pgsql-general

From Jasen Betts
Subject Re: How to obtain the maximum value of a date, between 3 tables...
Date
Msg-id ieen3l$j8e$1@reversiblemaps.ath.cx
Whole thread Raw
In response to How to obtain the maximum value of a date, between 3 tables...  (Andre Lopes <lopes80andre@gmail.com>)
List pgsql-general
On 2010-12-08, Andre Lopes <lopes80andre@gmail.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

pgsql-general by date:

Previous
From: Ray Stell
Date:
Subject: Re: PANIC: ERRORDATA_STACK_SIZE exceeded
Next
From: Jasen Betts
Date:
Subject: Re: if-clause to an exiting statement