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
Select title,c.name as category,f.rental_rate as rental_rate, avg(f.rental_rate) over (partition by c.name) as category_avg_rental_rate from film as f left join film_category as fc on fc.film_id=f.film_id left join category c on c.category_id=fc.category_id left join inventory as i on f.film_id=i.film_id --left join rental as r on i.inventory_id=r.inventory_id --left join payment as p on r.customer_id=p.customer_id and r.rental_id=p.rental_id

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

Copy Clear