1. 가장 비싼 상품 구하기
select max(price) as max_price
from product;
2. 최댓값 구하기
select max(datetime) as 시간
from animal_ins;
3. 최솟값 구하기
select min(datetime) as 시간
from animal_ins;
4. 동물의 수 구하기
select count(animal_id) as count
from animal_ins;
5. 잡은 물고기 중 가장 큰 물고기의 길이 구하기
select concat(max(length), 'cm') as max_length
from fish_info;
6. 가격이 제일 비싼 식품의 정보 출력하기
select product_id, product_name, product_cd, category, price
from food_product
where price = (select max(price) from food_product);
7. 중복 제거하기
select count(distinct name) as count
from animal_ins;