On Thu, Jan 17, 2019 at 9:14 AM Rich Shepard <rshepard@appl-ecosys.com> wrote:
> ORDER BY c.contact_id, a.next_contact DESC;
> The WHERE clause needs to exclude a contact_id where the most current row in
> Activities has NULL for the next_contact column.
Why is next_contact allowed to be null?
Your concept of "most current row" is strictly based upon next_contact
so if next_contact is null it is impossible to know whether it is the
most current row (consider that two activities could be missing the
next_contact date - which of those is the most current?)
David J.