SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select *, rank() over (order by cnt desc) as rc from (select customer_id, count(*) cnt from rental join inventory using(inventory_id) group by customer_id) tt where rc <= 3

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear