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
create table moex_fin ( date date, open_close numeric ); insert into moex_fin values ('2013-02-15', 3.15), ('2014-02-15', 4.15); with d as ( select date, open_close, lead(date) over (order by date asc) next_date, lead(open_close) over (order by date asc) next_open_close from moex_fin m ) select * from d where open_close BETWEEN 3.15 * 0.985 AND 3.15 * 1.005 ;

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

Copy Clear