About the Book
Turn SQL into your competitive edge for uncovering patterns and accelerating data-driven business decisions
Key Features
Solve real business problems with advanced SQL techniques
Work with time-series, geospatial, and text data using PostgreSQL
Build job-ready analytics skills with hands-on SQL projects
Purchase of the print or Kindle book includes a free PDF eBook
Book DescriptionSQL remains one of the most powerful tools in modern data analytics, helping you turn data into decisions. This book shows you how to go beyond writing queries to deliver insights that matter.
SQL for Data Analytics, Fourth Edition, is for anyone who wants to move past basic SQL syntax and use it to interpret real-world data with confidence. Whether you're trying to make sense of production data for the first time or upgrading your analytics toolkit, this book gives you the skills to turn data into actionable outcomes.
You'll start by creating and managing structured databases before advancing to data retrieval, transformation, and summarization. From there, you’ll take on more complex tasks such as window functions, statistical operations, and analyzing geospatial, time-series, and text data.
With hands-on exercises, case studies, and detailed guidance throughout, this book prepares you to apply SQL in everyday business contexts—whether you're cleaning data, building dashboards, or presenting findings to stakeholders. By the end, you'll have a powerful SQL toolkit that translates directly to the work analysts do every day.What you will learn
Write queries to analyze and summarize structured data
Use JOINs, subqueries, views, and CTEs effectively
Apply window functions to identify patterns and trends
Perform statistical analysis and hypothesis testing in SQL
Analyze JSON, arrays, geospatial, and time-series data
Improve SQL performance using indexes and query plans
Load data with Python and automate analytics workflows
Complete a case study to experience solving real-world analytics problems
Who this book is forThis book is for aspiring data engineers, backend developers, analysts, and students who want to use SQL for real-world data analytics. You should have basic SQL and college-level math knowledge, and along with the desire to advance your skills in data transformation, pattern recognition, and business insight delivery.
Table of Contents:
Table of Contents
Introduction to Data Management Systems
Creating a Table with a Solid Structure
Exchange Data Using COPY
Manipulating Data with Python
Presenting Data with SELECT
Transforming and Updating Data
Defining Datasets from Existing Datasets
Aggregating Data with GROUP BY
Inter-Row Operation with Window Functions
Performant SQL
Processing JSON and Arrays
Advanced Data Types: Date, Text, and Geospatial
Inferential Statistics Using SQL
A Case Study for Analytics Using SQL
About the Author :
Jun Shan is a principal cloud solution advisor and data architect with 20+ years of professional experience. He has been working in the data management field since the beginning of his career and has delivered data solutions to various companies, such as Amazon and Bank of America. He also teaches about relational databases and SQL at several universities. Jun is the author of SQL for Data Analytics,Third Edition, and received his Master of Science in Computer Science from Virginia Tech. Haibin Li obtained his Ph.D. in Atmospheric Science from Rutgers University. He is currently a lead predictive modeler with a decade of data science experience in the insurance industry. He has extensive working knowledge of data management and SQL. Hiabin is the technical reviewer of SQL for Data Analytics, Third Edition. Matt Goldwasser is Vice President and Head of AI and Data Science for Global Distribution at T. Rowe Price. He leads strategic initiatives using machine learning (ML) and advanced analytics across the organization. With over 8 years at T. Rowe Price, he brings expertise in applied data science, MLOps, and AWS, with a strong focus on operationalizing AI at scale. Previously, Matt held multiple roles at OnDeck, leading marketing analytics and building predictive models and automated ML pipelines. He also worked in data engineering, risk analysis, and product management at Millennium Management, GE, and the Port Authority of NY and NJ. He is known for turning complex challenges into scalable solutions and bridging strategy with hands-on innovation. Upom Malik is a data science and analytics leader who has worked in the technology industry for over eight years. He holds a master's degree in chemical engineering from Cornell University and a bachelor's degree in biochemistry from Duke University. As a data scientist, Upom has overseen efforts across machine learning, experimentation, and analytics at various companies throughout the United States. He uses SQL and other tools to solve complex challenges in finance, energy, and consumer technology. Outside of work, he enjoys reading, hiking the trails of the Northeastern United States, and savoring ramen bowls from around the world. Benjamin Johnston is a senior data scientist for one of the world's leading data-driven MedTech companies and is involved in the development of innovative digital solutions throughout the entire product development pathway, from problem definition to solution research and development, through to final deployment. He is currently completing his Ph.D. in ML, specializing in image processing and deep convolutional neural networks. He has more than 10 years of experience in medical device design and development, working in a variety of technical roles, and holds a first-class honors bachelor's degree in both engineering and medical science from the University of Sydney, Australia.