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 tbl (channel_id int, author_palylist_id int, views int); insert into tbl values(1, 1, 22), (1, 1, 20), (1, 2, 2), (1, 2, 200), (1, null, 1000), (2, 3, 12), (2, 3, 23), (2, 4, 233), (2, 4, 20), (2, null, 90); select *, row_number() over(partition by author_palylist_id) as pls from tbl order by pls;

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

Copy Clear