# exercícios back-end aula 25/07 ## exercício 01 ``` sql select distinct category, count(name) from times group by category order by count(name) desc ``` ## exercício 02 ``` sql select * from times where (birth_year between 1920 and 1965) and (birth_year not between 1945 and 1955) ``` ## exercício 03 ``` sql select name, birth_year from times where death_year is null and birth_year is not null group by birth_year, name order by birth_year asc ``` ## exercício 04 ## exercício 05 ``` sql select count(*) from times where category = 'Revolution' or category = 'Technology' or category = 'Science' ``` ## exercício 06 ``` sql select count(*) from times where category in ('Technology', 'Revolution', 'Science') ``` ## exercício 07 ## exercício 08 ``` sql select honor from times where year <= 1998 select count(*) from times where year <= 1998 and honor like 'M_n%' select count(*) from times where year <= 1998 and honor like 'Wom_n%' select name from times where year > 1998 ```