Search Postgresql Archives

Re: Subquery to select max(date) value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Mar 2019, Ken Tanzer wrote:

You need the ORDER BY in the outer join.

Ken,

I thought so. But, ...

(And I don't think the one inside the lateral join is doing you any good).
Try:
...
             a.next_contact is not null
            limit 1) sq
           order by sq.next_contact DESC;

This re-orders the returned set, but still not in chronological order.

Thanks,

Rich





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux