Запрос должен вернуть мне несколько count в зависимости от ActionTypeId.
Таблица MathcupLog (Id, MathcupId, ActionTypeId и т.д)
SELECT COUNT( * ) AS Всего ,
(SELECT COUNT(ActionTypeId) AS FGmade FROM MatchupLog WHERE (ActionTypeId =3),
(SELECT COUNT(ActionTypeId) AS FGMissed FROM MatchupLog WHERE (ActionTypeId = 4)
FROM dbo.MatchupLog where MatchupId=1
Запрос должен вернуть мне несколько count в зависимости от ActionTypeId
И вернёт:
SELECT
(SELECT COUNT(ActionTypeId) FROM MatchupLog WHERE (ActionTypeId = 3)) AS FGmade,
(SELECT COUNT(ActionTypeId) FROM MatchupLog WHERE (ActionTypeId = 4)) AS FGMissed