select count(*) -- record 의 개수
select count(distinct field) -- 중복 제거, null 값도 개수의 포함된다. 때문에 **평균에 주의**
from products
select supplierID
, categoryID
, avg(price)
from products
group by supplierId categoryID-- 반드시 select 에 들어가야 한다.
order by avg(price) desc
**-- where 절이 group by 보다 실행 순서에 앞서기 때문에 group by 의 조건절은 having 을 사용**