Last active
May 23, 2017 06:28
-
-
Save RaghuS007/d4bad430249a6ab3538811da65708739 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select f.Country_Name ,e.Season_Year,sum([Runs_Scored]) as [Runs Scored] | |
| from [dbo].[Ball_by_Ball] a | |
| inner join [dbo].[Batsman_Scored] b | |
| on concat(a.Match_Id,a.Over_Id,a.Ball_Id,a.Innings_No)= | |
| concat(b.[Match_Id],b.Over_Id,b.Ball_Id,b.Innings_No) | |
| inner join Player c on a.Striker=c.Player_Id | |
| inner join Match d on a.Match_Id=d.Match_Id | |
| inner join Season e on d.Season_Id=e.Season_Id | |
| inner join Country f on f.Country_Id=c.Country_Name | |
| where e.Season_Year=2016 | |
| group by f.Country_Name,e.Season_Year | |
| order by 3 desc | |
Author
RaghuS007
commented
May 23, 2017

Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment