Using the statement below as a guide, create the followingstatements:
- Write a query to join staff and store tables on staff_id andmanager_staff_id columns. List the following columns:
- storeName
- first_name
- last_name
- username
- Write a query using the join statement from query 1 above tofind all of the stores where the last name of the manager startswith the letter S. (copy 1 and modify it so I can run bothqueries)
- Write a query to list the title and description from the filmtable for movies that have a PG rating
- Write a query to list the title and description from the filmtable for movies that have trailers as a special_feature (hint:Like with wildcard)
- Write a query to join customer and multiple tables to bringback first_name, last_name, address, city, district, andpostal_code. (hint: modify the example below to join new table andadd necessary columns)
- Write a query to return the rental id and rental date from therental table of movies with rental dates from ‘2005-05-01 00:00:01’and ‘2005-05-26 11:59:59’
select
addr.address_id,
addr.address,
addr.postal_code,
cit.city,
cou.country
from
address as addr
inner join
city as cit on cit.city_id = addr.city_id
inner join
country as cou on cou.country_id = cit.country_id
where
cou.country = ‘United States’
order by
addr.postal_code;
Expert Answer
Answer to Using the statement below as a guide, create the following statements: Write a query to join staff and store tables on s…