Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL query produces results which display COUNT(movie.mov_title) as the result in the COUNT(movie.mov_title) column. How can it be modified to produce a numerical result? Show

 SQL query produces results which display COUNT(movie.mov_title) as the result in the COUNT(movie.mov_title) column. How can it be modified to produce a numerical result?


Show the director and movie count for the director with the most movies SELECT dir_firstName, dir lastName, 

Show the director and movie count for the director with the most movies SELECT dir_firstName, dir lastName, "COUNT (movie.mov_title)" FROM ( SELECT director.dir firstName, director.dir lastName, COUNT (movie.mov_title) AS COUNT (movie.mov_title)", RANK ( ) OVER (ORDER BY COUNT (movie.mov title) DESC) AS RankNum FROM director LEFT JOIN movie ON director.id = movie.dir id GROUP BY director.dir_firstName, director.dir lastName ) AS subquery WHERE RankNum = 1;

Step by Step Solution

3.53 Rating (160 Votes )

There are 3 Steps involved in it

Step: 1

The SQL query provided is already producing a numerical result in the COUNTmoviemovtitle column This ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Calculate the number of neutrons of 239Pu.

Answered: 1 week ago

Question

How can splitting a table improve performance?

Answered: 1 week ago