Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
select range_agg(m) from (select tsrange(lower(t) at time zone 'UTC', upper(t) at time zone 'UTC', '[]') m from unnest('{(2020-01-02 03:04:05, 2021-02-03 06:07:08), (2023-01-02 03:04:05, 2024-02-03 06:07:08)}'::tstzmultirange) t) tt group by true ;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear