clear markdown compare help best fiddles feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3601491 fiddles created (47963 in the last week).

SELECT datemultirange '{[2021-01-01,2022-01-01)}' - datemultirange '{[2021-03-01,2021-06-02]}';
?column?
{[2021-01-01,2021-03-01),[2021-06-03,2022-01-01)}
 hidden batch(es)


SELECT datemultirange '{[2021-01-01,2021-12-31]}' - datemultirange '{[2021-03-01,2021-06-02], [2021-07-01,2021-12-30]}';
?column?
{[2021-01-01,2021-03-01),[2021-06-03,2021-07-01),[2021-12-31,2022-01-01)}
 hidden batch(es)