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

SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular

SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code. You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.

Copy Format Clear
CREATE FUNCTION test(daterange[]) RETURNS datemultirange LANGUAGE SQL IMMUTABLE PARALLEL SAFE RETURN (SELECT range_agg(t.x) FROM (SELECT unnest($1) x) t); WITH i AS ( SELECT ARRAY[ daterange('2023-01-01', '2023-02-01'), daterange('2023-05-01', '2023-09-01') ]::daterange[] x ) SELECT test(i.x) from i;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear