public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: Extract only maximum date from column [RESOLVED]
Date: Fri, 5 Dec 2025 08:04:40 -0800 (PST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Fri, 5 Dec 2025, Thiemo Kellner wrote:
> Am I missing something?
Thiemo,
Nope. I was the one missing something:
select p.person_nbr, p.company_nbr, max(c.next_contact)
from people as p
inner join contacts as c
on p.person_nbr = c.person_nbr
where c.next_contact >= '2025-11-01'
group by p.person_nbr, p.company_nbr
order by p.person_nbr, p.company_nbr;
and,
person_nbr | company_nbr | max
------------+-------------+------------
226 | 736 | 2025-12-02
367 | 396 | 2026-01-06
464 | 2286 | 2025-11-05
465 | 702 | 2025-11-17
537 | 356 | 2025-11-03
553 | 367 | 2025-12-02
554 | 641 | 2025-12-02
...
Mea culpa!
Many thanks,
Rich
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Extract only maximum date from column [RESOLVED]
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox