error whenever I try to import it into MySQL using this code SELECT store_id AS Store, COUNT(*) AS Num_Customers FROM sakila.customer GROUP BY store_id ORDER BY store_id DESC, COUNT(*) DESC; SELECT film.title AS Title, rental.rental_date AS Rental_Date, rental.return_date AS Return_Date FROM sakila.customer JOIN sakila.rental ON customer.customer_id = rental.customer_id JOIN sakila.inventory ON rental.inventory_id = inventory.inventory_id JOIN sakila.film ON inventory.film_id = film.film_id WHERE customer.first_name = 'JO' AND customer.last_name = 'FOWLER' ORDER BY rental.rental_date ASC; REPLACE VIEW top_rental_films AS CREATE OR SELECT film.title AS FilmTitle, COUNT(rental.rental_id) AS Num_Rentals, AVG(payment.amount) AS Avg_Amt FROM sakila.film JOIN sakila.inventory ON film.film_id = inventory.film_id JOIN sakila.rental ON inventory.inventory_id = rental.inventory_id JOIN sakila.payment ON rental.rental_id = payment.rental_id GROUP BY film.film_id ORDER BY AVG(payment.amount) DESC LIMIT 10;
Hello I am receiving this error whenever I try to import it into MySQL using this code
SELECT store_id AS Store, COUNT(*) AS Num_Customers
FROM sakila.customer
GROUP BY store_id
ORDER BY store_id DESC, COUNT(*) DESC;
SELECT film.title AS Title, rental.rental_date AS Rental_Date, rental.return_date AS Return_Date
FROM sakila.customer
JOIN sakila.rental ON customer.customer_id = rental.customer_id
JOIN sakila.inventory ON rental.inventory_id = inventory.inventory_id
JOIN sakila.film ON inventory.film_id = film.film_id
WHERE customer.first_name = 'JO' AND customer.last_name = 'FOWLER'
ORDER BY rental.rental_date ASC;
REPLACE VIEW top_rental_films AS
CREATE OR SELECT film.title AS FilmTitle, COUNT(rental.rental_id) AS Num_Rentals, AVG(payment.amount) AS Avg_Amt
FROM sakila.film
JOIN sakila.inventory ON film.film_id = inventory.film_id
JOIN sakila.rental ON inventory.inventory_id = rental.inventory_id
JOIN sakila.payment ON rental.rental_id = payment.rental_id
GROUP BY film.film_id
ORDER BY AVG(payment.amount) DESC
LIMIT 10;
Could someone help me out with this?


Step by step
Solved in 3 steps









