SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
with t1 as (select customer_id, month(payment_date) month, count(rental_id) cnt from payment WHERE customer_id <=10 group by customer_id, month(payment_date)) select *, sum(cnt) over(month) from t1 order by month

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear