On Fri, Apr 08, 2005 at 20:50:09 -0400,
  Tom Lane <[EMAIL PROTECTED]> wrote:
> 
>       SELECT (SELECT x FROM tab WHERE ... ORDER BY x LIMIT 1),
>              (SELECT y FROM tab WHERE ... ORDER BY y DESC LIMIT 1);
 
> Comments?  Anyone see anything I missed?

Are NULLs a problem? In the second case above, wouldn't you get NULL
instead of the value returned by max if there were some NULL and some
not NULL values?

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to