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 (ID int not null, dt date not null); Insert into t (ID, dt) Values (123412345, '20230223'), (123412345, '20230219'), (123412345, '20230207'), (999999999, '20230215'), (999999999, '20230209'); Select id From t Group by id Having max(dt) = '20230223';

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

Copy Clear