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 (uuid text, name text, phone_number text); insert into t values ('5esd', 'ari', '111-222-333'), ('6dcv', 'lee', '111-222-333'), ('56js', 'poo', '667-784-343'); select t.* from t join ( select phone_number from t group by phone_number having count(phone_number) > 1 ) d on t.phone_number = d.phone_number; select t.* from t join t t_copy using(phone_number) where t.uuid != t_copy.uuid;

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

Copy Clear