sql - 团队,年度明智的bpundaries

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql - 团队,年度明智的bpundaries相关的知识,希望对你有一定的参考价值。

-- 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 

以上是关于sql - 团队,年度明智的bpundaries的主要内容,如果未能解决你的问题,请参考以下文章

sql 团队明智的界限很重要

在 oracle 中获取每月明智的年度报告

sql 明智的,日期时间,tsql.sql

sql SQL查询到Kohli季节明智的运行计数。

sql 季节明智的界限

sql 季节明智的托管比赛数量