SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
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 ChatGPT!
Copy Clear