What is the description and the number of partners for each age range?
SELECT ar.description, COUNT(p.age_range_id) AS partner_count FROM partner AS p JOIN age_range AS ar ON p.age_range_id = ar.age_range_id GROUP BY ar.description;
0 a 12 anos, 1; 13 a 20 anos, 7; 21 a 30 anos, 72; 31 a 40 anos, 165; 41 a 50 anos, 259; 51 a 60 anos, 224; 61 a 70 anos, 123; 71 a 80 anos, 85; Maiores de 80 anos, 42; Não se aplica, 22