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
류수미
,
송희정
,
앨런 볼리외
March 2021
Beginner to intermediate
456 pages
12h 49m
Korean
Hanbit Media, Inc.
Content preview from
러닝 SQL: 데이터 생성, 검색, 조작까지 데이터 제대로 주무르기
212
러닝 SQL
8.2.2
고유한 값 계산
각 그룹에서
count
()
함수를 사용할 때, 그룹의
모든
customer
_
id
수를 계산할지
(
중복 포함
)
아니면 그룹의
모든
customer
_
id
중에
고유한
값
distinct
value
에 대해서만 계산할지 선택할 수 있
습니다.
다음 쿼리는
customer
_
id
에 대해 두 가지 다른 방식으로
count
()
함수를 사용하는 예제입
니다.
mysql> SELECT COUNT(customer_id) num_rows,
-> COUNT(
DISTINCT
customer_id) num_customers
-> FROM payment;
+----------+---------------+
| num_rows | num_customers |
+----------+---------------+
| 16049 | 599 |
+----------+---------------+
1 row in set (0.01 sec)
쿼리의 첫
번째
열은
단순히
payment
테이블의
행
수를
계산하는
반면
두
번째 열은
customer
_
id
의 값을 비교해서 고유한 값을 가지는
customer
_
id
의 수만 계산합니다. 이렇게
distinct
를 지정함으로써
count
()
함수는 단순하게 그룹의 값의 수를 세는 대신, 중복을 찾
아 제거하기 ...
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
클라우드 네이티브를 위한 데이터 센터 네트워크 구축: 데이터 센터 네트워킹을 위한 아키텍처, 프로토콜, 도구
정기훈, 디네시 G. 더트
스파크를 활용한 실시간 처리: 실시간 데이터 처리를 위한 고수준 스트리밍 API 마스터하기
김인범, 제러드 마스, 프랑수아 가릴로
데이터 과학을 위한 통계: 데이터 분석에서 머신러닝까지 50가지 핵심 개념
이준용, 피터 브루스, 앤드루 브루스
한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
한선용, 이선 브라운
Publisher Resources
ISBN: 9791162244074