Ejercicios Sakila

Películas de la categoría ‘Action’

Actores que han trabajado en películas de la categoría ‘Action’

Clientes de Argentina

Clientes que hayan alquilado películas de la categoría ‘Action’


select title from film join film_category using (film_id)
join category using (category_id)
where name='Action'

select distinct first_name,last_name
from actor join film_actor using(actor_id)
join film using(film_id)
join film_category using(film_id)
join category using(category_id)
where name='action'
order by first_name, last_name

select country,first_name,last_name from country join city
on country.country_id=city.country_id
join address on city.city_id=address.city_id
join customer on address.address_id=customer.address_id
where country='argentina'
order by first_name, last_name

select distinct first_name, last_name
from customer join rental using (customer_id)
join inventory using (inventory_id)
join film using (film_id)
join film_category using (film_id)
join category using (category_id)
where name='Action'

select first_name, last_name from country join city using (country_id)
join address using (city_id)
join customer using (address_id)
join rental using (customer_id)
join inventory using (inventory_id)
join film using (film_id)
join film_category using (film_id)
join category using (category_id)
where name='Action' and country='argentina'