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 t ( user_id int, value_1 int, value_2 int ); insert into t values (100, 50, 1), (100, 50, 2), (101, 50, 1), (101, 50, 2), (102, 50, 2), (102, 50, 3); select * from t; delete from t where exists ( select 1 from t tdouble where t.user_id = tdouble.user_id and t.value_1 = tdouble.value_1 and t.value_2 > tdouble.value_2 ); select * from t;

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

Copy Clear