Posts by Clayton • 11 points
1 post
-
1
votes1
answer1533
viewsA: List sub-query table with main query
SELECT Zona.nomeZona, ( SELECT SUM(qtdPessoas) AS ttPessoas FROM ( SELECT COUNT(DISTINCT Itinerario.codFuncionario) AS qtdPessoas, Itinerario.codZona1 FROM Itinerario GROUP BY Itinerario.codZona1…