V2movie High Quality
-- Remove existing view if it exists DROP VIEW V2Movie; GO -- Create the new view CREATE VIEW V2Movie (ActorId, MvCnt, TotNoms, TotAwrds) AS ( SELECT C.ActorId, COUNT(*), SUM(D.Nomins), SUM(D.Awards) FROM Casting C INNER JOIN DVDMovie D ON C.MovieID = D.MovieID GROUP BY C.ActorId ); GO -- Verify the results SELECT * FROM V2Movie; Use code with caution. Copied to clipboard Final Result Summary
: Typically contains ActorId and a movie foreign key. Movie Table : Contains the Nominations and Awards columns. 3. Use Aggregate Functions v2movie
"Who are you?" Leo asked.
