sql 在拉吉夫甘地国际体育场,在过去八场比赛中获得技巧明智的门票

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 在拉吉夫甘地国际体育场,在过去八场比赛中获得技巧明智的门票相关的知识,希望对你有一定的参考价值。

-- IN Rajiv Gandhi International Stadium , Skill Wise Wickets Taken in Last eight matches 

WITH Data ( Match , Bowler , Bowling_skill , Style) 
AS
(
SELECT C.Match_Id, D.Player_Name , E.Bowling_skill ,
		CASE E.Bowling_skill
			WHEN 'Right-arm medium'  THEN 'Fast'
			WHEN 'Right-arm offbreak' THEN 'Spin'
			WHEN  'Right-arm fast-medium' THEN 'Fast'
			WHEN  'Legbreak googly' THEN 'Spin'
			WHEN  'Right-arm medium-fast' THEN 'Fast'
			WHEN  'Left-arm fast-medium' THEN 'Fast'
			WHEN  'Slow left-arm orthodox' THEN 'Spin'
			WHEN  'Slow left-arm chinaman' THEN 'Spin'
			WHEN  'Left-arm medium-fast' THEN 'Fast'
			WHEN  'Legbreak' THEN 'Spin'
			WHEN  'Right-arm fast' THEN 'Fast'
			WHEN  'Right-arm bowler' THEN 'Fast'
			WHEN  'Left-arm medium' THEN 'Fast'
			WHEN  'Left-arm fast' THEN 'Fast'
		END As 'Skill'
	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 Match C
	ON A.Match_Id = C.Match_Id
	INNER JOIN Player D
	ON A.Bowler = D.Player_Id
	INNER JOIN Bowling_Style E
	ON D.Bowling_skill = E.Bowling_Id
	WHERE C.Venue_Id = 7 AND B.Kind_Out IN (1,2,4,6,7,8) AND A.Match_Id IN (980988,980972,980958,980948,980940,980928,980920,829820)

	)

	SELECT Style , COUNT(*) As 'Wickets_Taken'
			FROM Data
			GROUP BY Style ;
      
      
      -- Linkedin Profile :  https://www.linkedin.com/in/harshasannareddy/

以上是关于sql 在拉吉夫甘地国际体育场,在过去八场比赛中获得技巧明智的门票的主要内容,如果未能解决你的问题,请参考以下文章

sql 体育场明智比赛主办

人工智能进军体坛显身手 千赢体育平台深耕前路更广阔

人工智能进军体坛显身手 千亿体育深耕AI前路更广阔

体育统计数据的 SQL 表设计

国际范儿!一流通信体系保障亚运压力测试赛顺利进行

NFT+体育,卡塔尔世界杯有哪些NFT看点!