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 words ( word varchar(64), rang int, engine char(1) ); insert into words values ('Word1', 3, 'Y'), ('Word1', 13, 'G'), ('Word2', 31, 'Y'); select word, min(case when engine = 'Y' then rang else null end) as Y_rang, min(case when engine = 'G' then rang else null end) as G_rang from words group by word;

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

Copy Clear