sql 在今天之前,只有一个六个投球手为皇家挑战赛的班加罗尔挑选一个检票口。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 在今天之前,只有一个六个投球手为皇家挑战赛的班加罗尔挑选一个检票口。相关的知识,希望对你有一定的参考价值。

-- Before Today , there were only one instance of six bowlers picking up a wicket for Royal Challenger's Bangalore.

-- ie., Against Pune_warriors

WITH Data ( Match , Batting_Team ,Player_Name , Wickets_Taken ) 
As
(    SELECT A.Match_Id , D.Team_Name , C.Player_Name , COUNT(*) As 'Wickets_Taken'
	 FROM Ball_by_Ball A
	 INNER JOIN Wicket_Taken 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.Bowler = C.Player_Id
	 INNER JOIN Team D
	 ON A.Team_Batting = D.Team_Id
	 WHERE Team_Bowling = 2 AND B.Kind_Out IN (1,2,4,6,7,8)
	 GROUP BY A.Match_Id , D.Team_Name ,C.Player_Name
)

SELECT Match , Batting_Team ,COUNT(*) As'Bowler_Contribution'
		FROM Data
		GROUP BY Match , Batting_Team
		HAVING COUNT(*) >= 6
		ORDER BY Bowler_Contribution DESC;

以上是关于sql 在今天之前,只有一个六个投球手为皇家挑战赛的班加罗尔挑选一个检票口。的主要内容,如果未能解决你的问题,请参考以下文章

帮助你更快学习JavaScript的六个思维技巧

3-上帝说要有光,于是就有了Python(下)

科比投球预测-python实例

csuoj-1721-皇家火枪手

金融核心系统云原生转型的三个挑战六个误区和四个步骤

在 SQLite 中生成平均值