For example, there is such a request:
select case when id in (1,2,3,4) then 'Elementary school'
when id in (5,6,7,8,9) then 'high school'
when id in (10,11) then 'high school'
end Class_type,
COUNT(*), sum(case when s.ocenka>4 then 1 end as) 'Honors' from class c
group by Class_type
You need to like this report was...