Created
December 20, 2016 10:40
-
-
Save harsha547/c1ee25775664631e3097b525a335f465 to your computer and use it in GitHub Desktop.
-- Team, Year wise bpundaries
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
| -- Team, Year wise bpundaries | |
| SELECT Team.Team_Name,season.season_year, | |
| Sum (CASE | |
| WHEN batsman_scored.runs_scored = 4 THEN 1 | |
| ELSE 0 | |
| END) AS 'Fours', | |
| Sum (CASE | |
| WHEN batsman_scored.runs_scored = 6 THEN 1 | |
| ELSE 0 | |
| END) AS 'Sixes' | |
| FROM MATCH | |
| INNER JOIN season | |
| ON match.season_id = season.season_id | |
| INNER JOIN batsman_scored | |
| ON batsman_scored.match_id = match.match_id | |
| INNER JOIN Team | |
| ON Match.Team_1 = Team.Team_Id | |
| GROUP BY Team.Team_Name,Season.season_year |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result 👍