1
Good evening everyone, I would like to sum up with the 3 (SUM CASE) below.
SELECT
SUM(CASE WHEN (a==b 2 THEN 1 ELSE 0 END) AS qtdDba,
SUM(CASE WHEN (a==b 5 THEN 1 ELSE 0 END) AS qtdDev,
SUM(CASE WHEN (a==b 10 THEN 1 ELSE 0 END) AS qtdAnalista
/*Porem com esse sum abaixo nao soma os 3 valores acima, tem alguma maneira
de somar esses 3 valores sem utilizar subselect*/
SUM(1) as totalSum
FROM
TABELA........
Your CASE doesn’t seem functional...
– Sorack
Is your case working? you need to detail the problem in detail in the statement. see for example case: http://sqlfiddle.com/#! 4/91262/7
– Kleudy Silva