Show the top 3 directors with the best movie ratings. This SQL query results in the AVG(rating.rev_rating)
Fantastic news! We've Found the answer you've been seeking!
Question:
Show the top 3 directors with the best movie ratings. This SQL query results in the AVG(rating.rev_rating) column showing results which only say AVG(rating.rev_rating) rather than a numerical result.
Transcribed Image Text:
SELECT dir firstName, dir lastName, "AVG(rating.rev_rating)" FROM ( SELECT director.dir_firstName, director.dir lastName, AVG(rating.rev_rating) AS "AVG (rating.rev_rating)", ROW_NUMBER () OVER (ORDER AVG(rating.rev_rating) DESC) BY AS RowNum FROM movie JOIN genre ON movie.gen_id = genre.id JOIN rating ON movie.id = rating.mov_id JOIN director ON movie.dir id = director.id GROUP BY director.dir_firstName, director.dir lastName ) AS subquery WHERE RowNum SELECT dir firstName, dir lastName, "AVG(rating.rev_rating)" FROM ( SELECT director.dir_firstName, director.dir lastName, AVG(rating.rev_rating) AS "AVG (rating.rev_rating)", ROW_NUMBER () OVER (ORDER AVG(rating.rev_rating) DESC) BY AS RowNum FROM movie JOIN genre ON movie.gen_id = genre.id JOIN rating ON movie.id = rating.mov_id JOIN director ON movie.dir id = director.id GROUP BY director.dir_firstName, director.dir lastName ) AS subquery WHERE RowNum
Expert Answer:
Answer rating: 100% (QA)
It looks like you have some syntax issues in your SQL query and you are encountering problems with t... View the full answer
Related Book For
Introduction To Management Science and Business Analytics A Modeling And Case Studies Approach With
ISBN: 9781260716290
7th Edition
Authors: Frederick S. Hillier, Mark S. Hillier
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Kitty Hawk Kites' trial balance reports an unadjusted Inventory balance of $1,050 and Cost of Goods Sold of $33,400. A physical count of the inventory indicates that the inventory on hand is $1,000....
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
As manager of a local pizza parlor, you want to develop a balanced scorecard so you can more effectively monitor the restaurants performance. Required a. Propose at least two goals for each...
-
The jet engine in Fig P3.50 admits air at 20°C and 1 atm at (1), where A1 = 0.5 m2 and V1 = 250 m/s. The fuel-air ratio is 1:30. The air leaves section (2) at 1 atm, V2 = 900 m/s, and A2 = 0.4...
-
Sylvan Company uses activity based costing to determine product costs for external financial reports. The company's partially completed Manufacturing Overhead T account for the current year is shown...
-
We will see in Chapter 8 that the pressure drop in fully developed pipe flow is sometimes computed with the aid of a friction factor, defined by \[ f=\frac{\Delta p}{\frac{1}{2} ho V^{2}}...
-
Hugo Reyes Company had the following account balances at year-end: Cost of Goods Sold $60,000; Inventory $15,000; Operating Expenses $29,000; Sales Revenue $115,000; Sales Discounts $1,200; and Sales...
-
A ball is thrown vertically, from a height h=24.7m, with velocity vi. It lands on the ground after a time interval t. Coordinate axes are indicated in the figure. Assume that air resistance is...
-
Suppose 40% of recent college graduates plan on pursuing a graduate degree. Fifteen recent college graduates are randomly selected. a. What is the probability that no more than four of the college...
-
Third Party Report Document Completed by supervisor Instructions for completion of Third party report. Candidates, all people who verify your work are to complete the details below to ensure...
-
What is not typically a basic concern of a financial services customer? Where can I get the best return on savings? How can I minimize costs for checking services? Will I be able to borrow money when...
-
How many years should be considered between the date of acquisition and the date of disposal of an asset, in order to calculate the ISR, in the declaration of people who obtain income from the...
-
What options would you have when you communicate with the other nearby villages so that your estimate of per-mile costs will be consistent and comparable for your manager? Explain
-
Two simply supported I-beams (one on the left and another one on the right of the bridge) are to be used for a single lane bridge and to complete a design to allow vehicles transported from one side...
-
A taxpayer inherits a classic car worth $37,000 at the date of the inheritance. They later get an offer to purchase the car for $45,000 and they seriously consider it despite the sentimental value....
-
The potential of the cell Zn(s) | ZnCl(0,010 21 mol kg ) | AgCl(s) | Ag(s) is found to be 1.156 6 V. What is the mean ionic activity coefficient of ZnCl in the solution?
-
Two mutually exclusive investment alternatives are being considered. Alternative A requires an initial investment of $20,000 in a machine. Annual operating and maintenance costs are anticipated to be...
-
When preparing to perform sensitivity analysis, how should one begin organizing the spreadsheet that contains the decision tree
-
Reconsider Problem 3.6. The admissions office now would like to predict the college GPA of the three applicants (a, b, and c). Apply the KNN algorithm with k = 7 to predict the college GPA for each...
-
What quantities appear in the uncertain variable cells of the spreadsheet model for this example?
-
A company issues a \(10 \%\) coupon bond that matures in 5 years. However, this company is in trouble, and it is estimated that each year there is a probability of .1 that it will default that year....
-
Calculate the volatility and the current price of oil futures implied by the call 1600 August and the call 1700 August of Figure 19.8 by using the Black-Scholes formula with \(T=.25\). OIL CRUDE OIL...
-
Mr. Smith wants to buy a car and is deciding between brands A and B. Car A costs \(\$ 20,000\), and Mr. Smith estimates that at the rate he drives he will sell it after 2 years and buy another of the...
Study smarter with the SolutionInn App