Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
SQL로 시작하는 데이터 분석
by
캐시 타니무라
,
박상근
August 2022
Beginner to intermediate
436 pages
9h 43m
Korean
Hanbit Media, Inc.
Content preview from
SQL로 시작하는 데이터 분석
339
6
장
이상 탐지
제일 안쪽 서브쿼리에서 규모가
5
를 넘는 지진 데이터만 필터링해
place
필드를 파싱하고 정
제합니다. 여기서는
place
필드에서 나라 또는 주와 같이 큰 단위의 지역 이름을 추출한 후
각 지진의 발생 시간
(
time
필드
)
과 함께 반환합니다. 중간 서브쿼리에서는
lead
함수를 사용
해 동일한 지역에서 그 이후에 발생한 지진이 있다면 발생 시간 값
(
next
_
time
)
을 가져오고,
현재 지진의 발생 시간과 다음 지진의 발생 시간 간의 차이
(
gap
)
를 계산합니다.
time
필드에
max
윈도우 함수를 사용해 지역별로 가장 최근에 발생한 지진의 시간 값도 가져옵니다. 그리고
외부쿼리에서
extract
함수를 사용해 규모가
5
를 넘는 지진 중 가장 최근에 발생한 지진 이후
2020
년
12
월
31
일
23
시
59
분
59
초(
‘
2020
-
12
-
31
23
:
59
:
59
’
)
까지 며칠이 지났는지 계산
합니다. 이 데이터에는
2020
년까지의 데이터만 저장돼 있어
2020
년 마지막 날짜를 기준으로
시간 차이를 계산했지만, 데이터가 실시간으로 계속해서 수집되고 있는 경우에는
current
_
timestamp
함수를 사용해 마지막 지진으로부터 현재까지 며칠이 흘렀는지 계산하면 됩니다.
avg
함수와
max
함수로 각 지역의 지진
gap
값의 평균과 가장 큰
gap
값을 계산하고, 여기서
도
extract
함수를 사용해
gap
값을
days
단위로 변환합니다.
이렇게 특정 지역에서 가장 최근 발생한 큰 지진 이후 현재까지 흐른 시간을
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
견고한 데이터 엔지니어링
조 라이스, 맷 하우슬리
행동 데이터 분석
플로랑 뷔송
데이터 과학을 위한 통계(2판)
이준용, 피터 브루스, 앤드루 브루스, 피터 게데크
파이썬 기반 금융 인공지능
이브 힐피시
Publisher Resources
ISBN: 9791169210089