The document contains 6 SQL queries:
1. Counts the number of rentals and returns by customer ID for customers from store 2 after February 2006.
2. Searches film descriptions for terms related to drama teachers.
3. Searches film descriptions for the term "Mad Scientist".
4. Lists the 10 most rented films by count in February 2006 using two different joins.
5. Counts rentals by store for February 2006 and orders by count.
6. Counts inventory of a specific film at store 1.
The document contains 6 SQL queries:
1. Counts the number of rentals and returns by customer ID for customers from store 2 after February 2006.
2. Searches film descriptions for terms related to drama teachers.
3. Searches film descriptions for the term "Mad Scientist".
4. Lists the 10 most rented films by count in February 2006 using two different joins.
5. Counts rentals by store for February 2006 and orders by count.
6. Counts inventory of a specific film at store 1.
The document contains 6 SQL queries:
1. Counts the number of rentals and returns by customer ID for customers from store 2 after February 2006.
2. Searches film descriptions for terms related to drama teachers.
3. Searches film descriptions for the term "Mad Scientist".
4. Lists the 10 most rented films by count in February 2006 using two different joins.
5. Counts rentals by store for February 2006 and orders by count.
6. Counts inventory of a specific film at store 1.
SELECT cus2.*, count(inventory_id), return_date FROM
(select * from customer where customer.store_id =2) cus2 join rental using(customer_id) where return_date is null or extract(year_month from return_date) >200602 group by cus2.customer_id 2. a. SELECT * FROM film_text WHERE description like '%drama%teacher%' or description like '%teacher%drama%' b. SELECT * FROM film_text WHERE MATCH(description) AGAINST('drama') and MATCH(description) AGAINST('teacher') 3. SELECT * FROM film_text WHERE MATCH(description) AGAINST('Mad Scientist') 4. C1. select title, count(inventory_id), rental_date from rental join (select * from inventory join film_text using(film_id)) inven_film using(inventory_id) where extract(year_month from rental_date) =200602 group by film_id order by count(inventory_id) desc limit 10 C2. select film_text.film_id, film_text.title, rental.rental_date, count(inventory_id) from inventory join film_text using(film_id) join rental using(inventory_id) where extract(year_month from rental_date)=200602 group by film_id order by count(inventory_id) desc limit 10 5. select store.*, count(inventory_id) as numDisc from store join rental on manager_staff_id =staff_id where extract(year_month from rental_date) =200602 group by store_id order by numDisc desc 6. select count(*) from inventory where inventory.film_id = (select film_id from film_text where title='AGENT TRUMAN') and store_id=1