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, data_created date, subject text, number_id int); insert into t values (1, '2022-10-11', 'Новая задача 1', 555), (2, '2022-10-12', 'Новая задача 2', 555), (3, '2022-10-12', 'Новая задача 4', 111), (4, '2022-10-13', 'Новая задача 5', 222), (5, '2022-10-14', 'Новая задача 7', 333); select t.*, count(*) over (partition by number_id) from t order by id;

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

Copy Clear