sql (oracle) counting number of overlapping intervals
问题 I have the following problem: Given the following table test in an oracle sql database: +----+------+-------+------+ | id | name | start | stop | +----+------+-------+------+ | 1 | A | 1 | 5 | +----+------+-------+------+ | 2 | A | 2 | 6 | +----+------+-------+------+ | 3 | A | 5 | 8 | +----+------+-------+------+ | 4 | A | 9 | 10 | +----+------+-------+------+ | 5 | B | 3 | 6 | +----+------+-------+------+ | 6 | B | 4 | 8 | +----+------+-------+------+ | 7 | B | 1 | 2 | +----+------+-------+