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 subscriptions (id serial, user_id int, created_at timestamp, end_at timestamp); insert into subscriptions values (1, 1, '2021-01-01 12:13:14', '2022-01-01 12:13:14'); create view subscriptions_status as select id, user_id, created_at, end_at, case when end_at > now() then 1 else 0 end active from subscriptions; select * from subscriptions_status;

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

Copy Clear