SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table myproducts ( id int auto_increment primary key, product_id int ); insert into myproducts (product_id) values (111), (111), (111), (111), (111), (112), (112), (112), (113), (114); select * from myproducts join ( select distinct product_id from myproducts order by product_id limit 1 ) unique_products on unique_products.product_id = myproducts.product_id;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear