Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a SQL query that analyses the film languages: How many films are mentioned

ID: 3642488 • Letter: W

Question




Write a SQL query that analyses the film languages: How many films are mentioned in the FilmDB per language and what is the average film length per each language? Note: Your query should consider both English films and foreign language films (films where the original_language attribute is set). Show in your result each language (by name), the number of movies in each language and the average length of films of this language. List the result so that the languages with the highest average film length come first before 'shorter languages'.



Output should look like this:


Write a SQL query that analyses the film languages: How many films are mentioned in the FilmDB per language and what is the average film length per each language? Note: Your query should consider both English films and foreign language films (films where the original_language attribute is set). Show in your result each language (by name), the number of movies in each language and the average length of films of this language. List the result so that the languages with the highest average film length come first before 'shorter languages'. Output should look like this:

Explanation / Answer

SELECT B.name as language name , COUNT(film_id) as number of films , AVG(length) as average film length FROM Film A, Language B WHERE A.language_id=B.language_id GROUP BY B.name ORDER BY AVG(length) desc

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote