Question: SQLS [35 mins] [17 marks] 6. Show all the persons' names and age from the casts table who are at least 40 years old. 7.
![SQLS [35 mins] [17 marks] 6. Show all the persons' names](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f38fcf3d4f4_09466f38fce9703f.jpg)
SQLS [35 mins] [17 marks] 6. Show all the persons' names and age from the casts table who are at least 40 years old. 7. Show the movies' names, ratings and BO earnings who have ratings at least IMDB rating 7. 8. Find those actors/actresses who have exact 4 letters in their first name. 9. Find the total unique number of movies from the casts table. 10. Amber Heard is being sued over a case by his husband Johnny Depp, and people wants her to be excluded from the Aquaman movie. We need to hear people's voce. Take action. 11. Wait! Millie Bobby Brown was not in the Game of Thrones!!! Who put her name that in the casts? Make correction ASAP, she was in Stranger Things. JOIN 12. Find the Movie name, their casts' first_name, last_name in a single resultant table. 13. Find those lucky actors whose movies earned at least 300 million in the Box Office. a. HINT: You can use WHERE Clause after the appropriate JOIN clause. 14. Which category was played by actors/actresses of at least 30 years old? Show appropriate columns. 15. Find Right Join, Left Join on these two tables. (Dare to find the CROSS join? Go ahead! May the force be with you!!) 16. Hollywood decided to donate charity of 15% of every movie which earned at least 100 million dollars in the box office. Find the movies names, their BO_earns_m$ and the amount of charity donation AS 'donation' column in the resultant table. a. HINT: You can create an instant column in the resultant table just mentioning the appropriate actions in the SQL command on an existing column. I. SELECT column1, (column1 * 0.15) AS column2 - (column2 values are 15% of column1 values) FROM table_name WHERE some_condition GROUP BY & HAVING (a bit of aggregate functions) 17. Group by movie category which have more earned between 300 and 500 m$. 18. Write a SQL query to find those movies, which have received highest IMDB ratings. Group the result set on movie title and sorts the result-set in ascending order by movie title. Return movie title and ratings and its actor names. SQLS [35 mins] [17 marks] 6. Show all the persons' names and age from the casts table who are at least 40 years old. 7. Show the movies' names, ratings and BO earnings who have ratings at least IMDB rating 7. 8. Find those actors/actresses who have exact 4 letters in their first name. 9. Find the total unique number of movies from the casts table. 10. Amber Heard is being sued over a case by his husband Johnny Depp, and people wants her to be excluded from the Aquaman movie. We need to hear people's voce. Take action. 11. Wait! Millie Bobby Brown was not in the Game of Thrones!!! Who put her name that in the casts? Make correction ASAP, she was in Stranger Things. JOIN 12. Find the Movie name, their casts' first_name, last_name in a single resultant table. 13. Find those lucky actors whose movies earned at least 300 million in the Box Office. a. HINT: You can use WHERE Clause after the appropriate JOIN clause. 14. Which category was played by actors/actresses of at least 30 years old? Show appropriate columns. 15. Find Right Join, Left Join on these two tables. (Dare to find the CROSS join? Go ahead! May the force be with you!!) 16. Hollywood decided to donate charity of 15% of every movie which earned at least 100 million dollars in the box office. Find the movies names, their BO_earns_m$ and the amount of charity donation AS 'donation' column in the resultant table. a. HINT: You can create an instant column in the resultant table just mentioning the appropriate actions in the SQL command on an existing column. I. SELECT column1, (column1 * 0.15) AS column2 - (column2 values are 15% of column1 values) FROM table_name WHERE some_condition GROUP BY & HAVING (a bit of aggregate functions) 17. Group by movie category which have more earned between 300 and 500 m$. 18. Write a SQL query to find those movies, which have received highest IMDB ratings. Group the result set on movie title and sorts the result-set in ascending order by movie title. Return movie title and ratings and its actor names
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
