# **BACK-END: AULA 09 - 25/07 (Exercício CASA)** ###### tags: `SQL` `Backend` `Cubos Academy` **1 QUESTÃO** ```sql= select distinct category from nobel; ``` **2 QUESTÃO** ```sql= select MAX(YEAR), MIN(YEAR) from nobel; ``` **3 QUESTÃO** ```sql= select distinct birth_country from nobel order by birth_country limit 5; ``` **4 QUESTÃO** ```sql= select category, count(category) from nobel group by category order by count(category ) desc; ``` **5 QUESTÃO** ```sql= select distinct count(sex) from nobel where sex = 'Female'; select category, count(Category) from nobel where sex = 'Female' group by category order by count(category) desc; ``` **6 QUESTÃO** ```sql= select count(category) from nobel where sex = 'Male'; select category, count(Category) from nobel where sex = 'Male' group by category order by count(category) desc; ``` **7 QUESTÃO** ```sql= select Full_Name from nobel where Birth_city = Death_city order by Full_name asc limit 5; ``` **8 QUESTÃO** ```sql= select * from ( SELECT full_name, count(*) AS qtd from nobel where laureate_type = 'Individual' group by full_name order by count(*) desc ) as honrados where honrados.qtd >1 limit 5; ```