# SQL을 이용한 Anomaly Detection

> Clean Markdown view of GeekNews topic #2913. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2913](https://news.hada.io/topic?id=2913)
- GeekNews Markdown: [https://news.hada.io/topic/2913.md](https://news.hada.io/topic/2913.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-09-26T10:26:38+09:00
- Updated: 2020-09-26T10:26:38+09:00
- Original source: [hakibenita.com](https://hakibenita.com/sql-anomaly-detection)
- Points: 12
- Comments: 2

## Topic Body

고교수준 통계학과 SQL 지식만으로 간단한 이상탐지 하기

- 평균과 표준편차를 구해서 범위를 벗어난 이상값 찾기

- Z값(표준값) 으로 찾기, Z값 최적화 하기

Nginx 로그 분석해서 이상값 찾기

- 갑작스런 500/400/404/200 상태코드의 증가량 잡아내기

- 일분마다 상태코드 갯수를 저장하는 테이블을 만들고, 그 데이터에서 평균/표준편차로 이상 탐지

- 반복 알림 제거하기

## Comments



### Comment 3006

- Author: xguru
- Created: 2020-09-26T10:26:44+09:00
- Points: 1

큰 서비스라면 다양한 도구를 쓸수 있겠지만, 이렇게 설명해주니 한번 적용해 보고 싶어 지네요.

### Comment 3007

- Author: galadbran
- Created: 2020-09-26T10:43:34+09:00
- Points: 1
- Parent comment: 3006
- Depth: 1

어우 요약도 잘 해주셔서 막 해보고 싶어지고 그러네요...
