ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

I nee to edit this VIew and add more information.

by | Nov 28, 2023 | computer science

I nee to edit this VIew and add more information. I am using MS-SQL ServerI need to add yearID and lgID (from Salaries table), and franchName from Franchises tableFrom the database Files listed below.

  • Attachment 1
  • Attachment 2

USE baseball;IF OBJECT_ID (‘player_history’,’V’) IS NOT NULLDROP VIEW player_history;GoCREATE VIEW Player_HistoryASSELECT A.playerID, A.[Player Name], A.[Teams Played], B.[Year Played], C.[TotalSalary], C.[Average Salary], D.[Last College Attended], E.[Last Year Played inthe AllStars], E.teamID AS[ID of Last Team]FROM(select M.playerID, M.nameFirst + ‘ ‘ + M.nameLast AS [Player Name], [TeamsPlayed]from Master M left JOIN(select playerID, COUNT(teamID) AS [Teams Played]from FieldingGROUP BY playerID) F ON M.playerID = F.playerID) ALEFT JOIN(select M.playerID, [Year Played]from Master M LEFT JOIN(select PlayerId, count(*) AS [Year Played]from (select PlayerId fromFieldinggroup by PlayerId, YearID) innnerQgroup by innnerQ.PlayerId) F ON M.playerID = F.playerID)BON A.playerID = B.playerIDLEFT JOIN(select playerID, SUM(salary) AS [Total Salary], AVG(salary)Salary]from salariesgroup by playerID) CON A.playerID = C.playerID AS [Average LEFT JOIN(select playerID, MAX(YearID) AS [Year Last Played], MAX(schoolID) AS [LastCollege Attended]FROMCollegePlayingGROUP BY playerID) DON A.playerID = D.playerIDLEFT JOIN(select A.playerID, A.[Last Year Played in the AllStars], MAX(teamID) teamIDfrom(select playerID, MAX(yearID) AS [Last Year Played in the AllStars]FROM AllstarFullGROUP BY playerID) ALEFT JOIN(select playerID, teamID, yearIDfrom AllstarFull) BON A.playerID = B.playerIDAND A.[Last Year Played in the AllStars] = B.YearIDGROUP BY A.playerID, A.[Last Year Played in the AllStars]) EON A.playerID = E.playerID;

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!