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로 시작하는 데이터 분석
77
2
장
데이터 준비
nullif(6,6)
위의
nullif
함수를 사용한 코드는 다음
CASE
문과 동일하게 동작합니다.
case when 6 = 7 then 6
when 6 = 6 then null
end
nullif
함수는 새로운 행이 데이터베이스에 추가될 때, 특정 필드의 기본값이 무엇인지 알고
있으며 이 값을
null
로 바꾸고 싶을 때 유용합니다. 예를 들어, 앞서 언급한 기본 날짜 설정 논
쟁을 해결하려면 다음과 같이
nullif
함수를 사용해
‘
1970
-
01
-
01
’
을
null
로 변환합니다.
nullif(date,’1970-01-01’)
WARNING
_
WHERE
절을 사용해 데이터를 필터링할 때
null
이 문제의 소지가 될 수 있습니다. 필터링한
결과가
null
인 경우만을 다룰 때는 다음처럼 간단히 해결됩니다.
WHERE my_field is null
하지만
my
_
field
필드가
null
값뿐 아니라 과일 이름 값을 저장한다고 해봅시다. 저장된 값이
‘
apple
’
이
아닌 행을 반환받고 싶다면 다음 쿼리를 수행할 겁니다.
WHERE my_field <> ‘apple’
하지만 어떤 데이터베이스에서는
my
_
field
필드에
‘
apple
’
뿐 아니라
null
값이 저장된 행까지 필터링되
기도 합니다. 이 문제를 해결하려면
SQL
을 작성할 때
OR
연산자를
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