Take your first steps to become a fully qualified data analyst by learning how to explore large relational datasets
Key FeaturesExplore a variety of statistical techniques to analyze your dataIntegrate your SQL pipelines with other analytics technologiesPerform advanced analytics such as geospatial and text analysisBook DescriptionUnderstanding and finding patterns in data has become one of the most important ways to improve business decisions. If you know the basics of SQL, but don't know how to use it to gain the most effective business insights from data, this book is for you.
SQL for Data Analytics helps you build the skills to move beyond basic SQL and instead learn to spot patterns and explain the logic hidden in data. You'll discover how to explore and understand data by identifying trends and unlocking deeper insights. You'll also gain experience working with different types of data in SQL, including time-series, geospatial, and text data. Finally, you'll learn how to increase your productivity with the help of profiling and automation.
By the end of this book, you'll be able to use SQL in everyday business scenarios efficiently and look at data with the critical eye of an analytics professional.
Please if you are having difficulty loading the sample datasets, there are new instructions uploaded to the GitHub repository. The link to the GitHub repository can be found in the book's preface.
What you will learnPerform advanced statistical calculations using the WINDOW functionUse SQL queries and subqueries to prepare data for analysisImport and export data using a text file and psqlApply special SQL clauses and functions to generate descriptive statisticsAnalyze special data types in SQL, including geospatial data and time dataOptimize queries to improve their performance for faster resultsDebug queries that won’t runUse SQL to summarize and identify patterns in dataWho this book is forIf you’re a database engineer looking to transition into analytics, or a backend engineer who wants to develop a deeper understanding of production data, you will find this book useful. This book is also ideal for data scientists or business analysts who want to improve their data analytics skills using SQL. Knowledge of basic SQL and database concepts will aid in understanding the concepts covered in this book.
Table of ContentsUnderstanding and Describing DataThe Basics of SQL for AnalyticsSQL for Data PreparationAggregate Functions for Data AnalysisWindow Functions for Data AnalysisImporting and Exporting DataAnalytics Using Complex Data TypesPerformant SQLUsing SQL to Uncover the Truth - A Case Study
A fast text to get you started on the basics of data analysis using SQL. It works mostly as a crashcourse with exercises you can follow, and ending with a case study applying all of your knowledge. The book starts with simple enough SQL, such as working with select, creating tables, etc, but also touches on subjects such as optimizing queries, creating triggers, windows functions (which are amazingly useful), and even touching on data analysis with Python. Might be a bit too much for a complete beginner, but overall covers the most important topis to get you work done.
Great resource for anyone wanting to grasp the nuances of SQL and wants to review core concepts for data analysis. It was very easy to read and dig into. The formatting of the code in the text is not the greatest but I would still highly recommend this book. The author covers a lot of great topics such as window functions, CTEs, query optimization, and time series analysis with sql.
Lots of REALLY great tips and solid advice/examples. Coming from T-SQL and trying to learn the nuances of Postgres is a little intimidating but this book really helped me see how some things can translate like
SELECT UNNEST(ARRAY[123, 456, 789]) AS example_ids;
essentially performing a T-SQL string_split cross apply in a much more legible way.