Created
May 23, 2017 11:31
-
-
Save RaghuDMT/f4ed01fbfe000a689e318e557ea210a8 to your computer and use it in GitHub Desktop.
This file contains 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 v.Venue_Name, sum(case when([Runs_Scored]=6) then 1 else 0 end) Sixes,count(distinct m.Match_Id) Matches,sum(case when([Runs_Scored]=6) then 1 else 0 end)/count(distinct m.Match_Id) Sixes_Per_Match | |
from [dbo].[Batsman_Scored] b | |
inner join Match m on b.Match_Id=m.Match_Id | |
inner join Venue v on v.Venue_Id=m.Venue_Id | |
group by v.Venue_Name | |
order by 2 desc |
Author
RaghuDMT
commented
May 23, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment