Getting the amount of overlap when using OVERLAPS

Поиск
Список
Период
Сортировка
От Tony Wasson
Тема Getting the amount of overlap when using OVERLAPS
Дата
Msg-id 6d8daee305092213441275804a@mail.gmail.com
обсуждение исходный текст
Ответы Re: Getting the amount of overlap when using OVERLAPS  (vishal saberwal <vishalsaberwal@gmail.com>)
Список pgsql-general
Given 2 date ranges, the overlaps functions returns TRUE or FALSE. I
want to find the # of days that are overlapping. Is there a "built in"
way to do this?  Should I just write a function to do it?

For instance, this example overlaps, but I want to know how much does
it overlap?

SELECT (DATE '2001-02-16', DATE '2001-12-21') OVERLAPS
       (DATE '2001-10-30', DATE '2002-10-30');

Thanks in advance!
Tony Wasson

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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: Questions about Rollback - after insert, update,
Следующее
От: Hannes Dorbath
Дата:
Сообщение: Re: Need for java based web admin tool