Re: Subquery to select max(date) value
| От | Ken Tanzer |
|---|---|
| Тема | Re: Subquery to select max(date) value |
| Дата | |
| Msg-id | CAD3a31WRASiBjSnHuz=CObtbkz7-M7yUC6yDsDieusFqVS_m_w@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Subquery to select max(date) value ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-general |
On Thu, Mar 28, 2019 at 4:07 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Mar 28, 2019 at 4:05 PM Ken Tanzer <ken.tanzer@gmail.com> wrote:(And I don't think the one inside the lateral join is doing you any good). Try:...a.next_contact is not nullorder by sq.next_contact DESC;
limit 1) sqThe fact that the subquery has a LIMT 1 clause leads me to assume the ORDER BY there is quite necessary.David J.
Ken
--


AGENCY Software
A Free Software data system
By and for non-profits
(253) 245-3801
learn more about AGENCY or
follow the discussion.
В списке pgsql-general по дате отправления: