# exercício back-end 16/07 ## exercício 01 ``` sql select distinct regiao from countries order by regiao asc ``` ## exercício 02 ``` sql select regiao, count(pais) as paises from countries group by regiao order by regiao asc ``` ## exercício 03 ``` sql select pais from countries where populacao > 5000000 and densidade_populacional >= 250 and pib > 1000 order by telefonia_movel asc limit 5 ``` ## exercício 04 ``` sql select pais from countries where populacao > 5000000 and densidade_populacional >= 250 and pib > 1000 order by telefonia_movel asc limit 5 offset 5 ``` ## exercício 05 ``` sql select pais from countries where (regiao = 'SUB-SAHARAN AFRICA' or regiao = 'NORTHERN AFRICA' or regiao = 'NEAR EAST') and industria_porcentagem > 0.66 and pib > 5000 ``` ## exercício 06 ``` sql select pais from countries where industria_porcentagem + servicos_porcentagem >= 0.75 and regiao <> 'EASTERN EUROPE' and regiao <> 'LATIN AMER. & CARIB' and regiao <> 'NORTHERN AMERICA' and regiao <> 'WESTERN EUROPE' and alfabetizacao > 90 and taxa_migratoria = 0 ```