Created
December 18, 2016 20:08
-
-
Save harsha547/e649880608625fa2f9e15a281e075711 to your computer and use it in GitHub Desktop.
Number of hosted matches season wise
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
-- Number of hosted matches season wise | |
SELECT | |
RANK() OVER ( ORDER BY Season.Season_Year ) As Season_Id, | |
Season.Season_Year , | |
COUNT(*) As 'Hosted Matches' | |
FROM | |
Match | |
INNER JOIN | |
Season | |
ON | |
Match.Season_Id = Season.Season_Id | |
GROUP BY GROUPING SETS ( Season.Season_Year , ()) | |
ORDER BY Season_Id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result 👍