Question: What is the SQL code I use to find this? The fields in the table being used are id, title, relese_year, country, duration, language, certification,

What is the SQL code I use to find this? The fields in the table being used are id, title, relese_year, country, duration, language, certification, gross, and budget.
Code a query to display the top five countries that have the highest average profit per movie. These countries must have made more than 5 movies to be included. To calculate the average profit, you subtract total budget from total gross and then divide it by the number of movies. However, you have to be careful not to include any movie that misses budget or gross data. A partial query result is below for your reference. country count avg_profit New Zealand YOU FIGURE OUT USA 3076 Australia 41 UK 325 4785466.406153846154 Canada 64 3234172.921875000000 Showing 5 out of 5 rows What is the average profit of movies made in New Zealand? Code a query to display the top five countries that have the highest average profit per movie. These countries must have made more than 5 movies to be included. To calculate the average profit, you subtract total budget from total gross and then divide it by the number of movies. However, you have to be careful not to include any movie that misses budget or gross data. A partial query result is below for your reference. country count avg_profit New Zealand YOU FIGURE OUT USA 3076 Australia 41 UK 325 4785466.406153846154 Canada 64 3234172.921875000000 Showing 5 out of 5 rows What is the average profit of movies made in New ZealandStep by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
