SQLAI.ai

average film rentals per month

            
SELECT EXTRACT(MONTH FROM rental_date) AS month, COUNT(*) / COUNT(DISTINCT EXTRACT(YEAR FROM rental_date)) AS avg_rentals_per_month FROM rental GROUP BY month;
  • Public
  • ·
  • Thu, 02 Mar 2023 18:56:00 GMT