CodePudding user response:
CodePudding user response:
Select month, sum (case when B.x xx='collision' then 1 end), sum (case when B.x xx='tipping' then 1 end),The from TB A, TB B
Where A.x x=B.x x
Group by month
CodePudding user response:
CodePudding user response:
Select month, sum (case when B.x xx='collision' then 1 end), sum (case when B.x xx='tipping' then 1 end),