tstzrange всех спасет.
CREATE TABLE calls(
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
duration tstzrange
);
WITH s(start) AS (
SELECT now() + random()*365*24*60*60*interval '1 sec'
FROM generate_series(1,100000)
)
INSERT INTO calls(duration)
SELECT tstzrange(s.start, s.start + random()*10*60*interval '1 sec') FROM s;
CREATE INDEX ON calls USING gist(duration);
WITH pairs(id, id2) AS (
SELECT
c1.id,
c2.id FROM calls c1 JOIN calls c2 ON c1.duration && c2.duration
), counts(cnt) AS (
SELECT count(*) AS cnt FROM pairs GROUP BY id
)
SELECT max(cnt) FROM counts;