I have a table with more than 5 thousand lines, where I have a column with year, municipal_names and another with values. I can get an average with a municipality that is represented in a row, but I wanted to do it all at once. They are all Brazilian municipalities. Is there any way? This is the code I'm using, but with this code, I can only do it one at a time.
SELECT nome, AVG(cota_fpm)
FROM economia
where nome = 'Alta Floresta D''Oeste';