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
with f as (select rental_date as d1, return_date as d2 from rental where customer_id=1) select d1,d2, ifnull((select f1.d2 from f as f1 where f1.d1>f.d1 and f1.d2>f.d2 and f1.d1<f.d2 limit 1 ) ,f.d2) as d3 from f

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

Copy Clear