Notice
Recent Posts
Recent Comments
Link
거의 알고리즘 일기장
프로그래머스 고득점 키트_ SUM, MAX, MIN_MYSQL 본문
https://programmers.co.kr/learn/challenges?selected_part_id=17043
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
1. 최댓값 구하기
1
2
3
4
|
select DATETIME as '시간'
from ANIMAL_INS
order by DATETIME desc
limit 1
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
2. 최솟값 구하기
1
2
3
4
|
select DATETIME as '시간'
from ANIMAL_INS
order by DATETIME asc
limit 1
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
3. 동물 수 구하기
1
2
|
select count(*)
from ANIMAL_INS
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
4. 중복 제거하기
1
2
3
|
select count(distinct(NAME))
from ANIMAL_INS
where NAME != ''
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
반응형
'SQL 문제' 카테고리의 다른 글
프로그래머스 고득점 키트 _ String, Date_MYSQL (0) | 2020.04.24 |
---|---|
프로그래머스 고득점 키트_ JOIN_MYSQL (0) | 2020.04.24 |
프로그래머스 고득점 키트 _ IS NULL_MYSQL (0) | 2020.04.24 |
프로그래머스 고득점 키트 _ GROUP BY_MYSQL (0) | 2020.04.23 |
프로그래머스 고득점 키트_ SELECT_MYSQL (0) | 2020.04.23 |
Comments