1
I’m new in sql and I’m having a hard time making the sum total of the values of a Count, follows below the code:
SELECT A.Pais, count(*)
from Aeroportos A
left join Estacoes E
on A.Sigla = E.ICAO
where E.ICAO IS NULL
group by A.Pais
order by Pais;
I would like to not only have the sum of airports per country also have the total sum of airports, I tried to use the SUM(count)
but made the mistake:
ERROR: Aggregate Function calls cannot be nested.
Everything in the same query will not work.
– Diego Souza
could put a sketch of the tables?
– Henrique Santiago
the total sum of airports is basically
select count(*) from Aeroportos
– Henrique Santiago
The count is only of
Aeroportos
that do not haveEstações
related ?– Lacobus
Simm, only from airports that don’t have stations
– Linkon Louvison