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 (dt datetime, t float); insert into T values ('2022-05-15 09:00:00', 18.36), ('2022-05-15 11:00:00', 21.6), ('2022-05-15 18:00:00', 17.8), ('2022-05-16 09:00:00', 17.3), ('2022-05-16 11:15:00', 18.36), ('2022-05-16 19:45:00', 20.62); select FORMAT(dt, 'yyyy-MM-dd') as d, max(t) as t from T group by FORMAT(dt, 'yyyy-MM-dd');

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

Copy Clear