Re: Subquery to select max(date) value

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Subquery to select max(date) value
Дата
Msg-id dcb38a6d-de22-4378-85b5-5255dfb6dd69@www.fastmail.com
обсуждение исходный текст
Ответ на Re: Subquery to select max(date) value  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Subquery to select max(date) value  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
On Wed, Feb 13, 2019, at 9:06 AM, Rich Shepard wrote:
> On Wed, 13 Feb 2019, Adrian Klaver wrote:
> 
> > Should have been clearer in my previous post, you can get rid of the nulls
> > by filtering out the entire row.
> 
> Adrian,
> 
> Thank you. I'm rebuilding the statement from the inside out (which helps me
> learn more SQL in the process). For example,
> 
> select * from activities where next_contact is not null and
>           next_contact <= 'today' and next_contact > '2018-12-31';
> 
> works as written. This suggests that it's the placement within the two joins
> that needs correcting. Now I'll add the two joined tables one at a time and
> learn how to structure the whole statement.


It will work if you use it to filter after the joins are done.

> 
> Best regards,
> 
> Rich
> 
> 
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Subquery to select max(date) value
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: Postgresql RDS DB Latency Chossing Hash join Plan