Analyze data like a pro, even if you’re a beginner. Practical SQL is an approachable and fast-paced guide to SQL (Structured Query Language), the standard programming language for defining, organizing, and exploring data in relational databases. Anthony DeBarros, a journalist and data analyst, focuses on using SQL to find the story within your data. The examples and code use the open-source database PostgreSQL and its companion pgAdmin interface, and the concepts you learn will apply to most database management systems, including MySQL, Oracle, SQLite, and others.* You’ll first cover the fundamentals of databases and the SQL language, then build skills by analyzing data from real-world datasets such as US Census demographics, New York City taxi rides, and earthquakes from US Geological Survey. Each chapter includes exercises and examples that teach even those who have never programmed before all the tools necessary to build powerful databases and access information quickly and efficiently. You’ll learn how to: • Create databases and related tables using your own data • Aggregate, sort, and filter data to find patterns • Use functions for basic math and advanced statistical operations • Identify errors in data and clean them up • Analyze spatial data with a geographic information system (PostGIS) • Create advanced queries and automate tasks This updated second edition has been thoroughly revised to reflect the latest in SQL features, including additional advanced query techniques for wrangling data. This edition also has two new chapters: an expanded set of instructions on for setting up your system plus a chapter on using PostgreSQL with the popular JSON data interchange format. Learning SQL doesn’t have to be dry and complicated. Practical SQL delivers clear examples with an easy-to-follow approach to teach you the tools you need to build and manage your own databases. * Microsoft SQL Server employs a variant of the language called T-SQL, which is not covered by Pr
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A patient, hands-on introduction to SQL that teaches beginners to query, clean, and analyze real datasets in PostgreSQL—and to find the story inside the numbers. Best for journalists, analysts, students, and anyone who works with data but has never written code.
【Book Arc】
- **Opening (~0%–15%)**: Sets up the working environment—PostgreSQL, the pgAdmin interface, and a text editor—then introduces what SQL is, why it matters, and who the book is for. Solves the "blank page" problem so readers can run code immediately.
- **Early (~15%–35%)**: Builds core fundamentals: importing/exporting data with COPY, basic math and statistics, joining tables, and designing tables with keys and constraints. This is the grammar of SQL.
- **Middle (~35%–60%)**: Moves into working with real data—dates and times, advanced query techniques (subqueries, CTEs, CASE, crosstabs), and text mining with regular expressions and full-text search. Here queries start answering real questions.
- **Late (~60%–85%)**: Applies SQL to specialized domains: spatial analysis with PostGIS, JSON data in PostgreSQL, and the second edition's expanded setup and JSON chapters. Also covers statistical functions and smoothing uneven data.
- **Ending (~85%–100%)**: Closes with a practical workflow for data storytelling—asking questions, documenting process, assessing data origins, identifying trends, and communicating findings—plus an appendix of PostgreSQL resources.
【Key Takeaways】
- **SQL is a durable, portable skill** (Early): The book stresses that SQL has been around for decades and remains one of the most-used languages; concepts learned in PostgreSQL transfer to MySQL, Oracle, SQLite, and others.
- **PostgreSQL is the teaching vehicle, not the point** (Early): Examples use PostgreSQL and pgAdmin, but the goal is general SQL fluency. Variants like T-SQL are explicitly out of scope.
- **Real datasets make abstract syntax concrete** (Middle): US Census demographics, NYC taxi rides, crime reports, and USGS earthquake data recur across chapters, so readers see how the same tables support different analyses.
- **Data cleaning is part of analysis, not a prelude** (Middle): The book treats identifying errors, handling missing values with NULL, and reclassifying data as core query skills.
- **Joins and table design are the backbone of relational work** (Early): Understanding key columns, relationship types, and constraints is presented as essential before advanced querying.
- **Advanced techniques unlock storytelling** (Late): Subqueries, CTEs, CASE, crosstabs, regular expressions, and full-text search are framed as tools for finding meaning, not just retrieving rows.
- **Spatial and JSON data are first-class citizens** (Late): PostGIS and PostgreSQL's JSON support show how SQL extends beyond flat tables into geographic and semi-structured data.
- **The end goal is communication** (Ending): The final workflow emphasizes asking why, documenting process, and communicating findings—SQL as a means to an insight, not an end.
【Reading Tips】
- **Do not skip Chapter 1**: The book explicitly warns against skipping setup; a working environment prevents headaches later.
- **Work sequentially**: Datasets from early chapters reappear later, so reading in order keeps context intact.
- **Type the code, don't just read it**: Exercises and examples are designed for hands-on practice; passive reading will not build fluency.
- **Skim the PostgreSQL-specific chapters if you use another DBMS**: Chapters 14–19 cover PostgreSQL-specific features (full-text search, GIS, JSON); the earlier chapters are more portable.
- **Use the appendix as a reference**: The PostgreSQL resources section is useful for ongoing learning after finishing the book.
【Coverage Limits】
This guide is based on stratified excerpts covering the book's structure, introduction, and chapter listings; specific code details, exercise solutions, and some chapter contents are not fully represented. The excerpts do not cover every chapter's internal examples in depth.
Excerpt 1
format. Learning SQL doesn’t have to be dry and complicated. Practical SQL delivers clear examples with an easy-to-follow approach to teach you the tools you...
a Subset of Rows with COPY Adding a Value to a Column During Import Using COPY to Export Data Exporting All Data Exporting Particular Columns Exporting Query...
GIS Functions Creating a Geometry Type from Well-Known Text Creating a Geography Type from Well-Known Text Using Point Functions Using LineString Functions U...
ion Document Your Process Gather Your Data No Data? Build Your Own Database Assess the Data’s Origins Interview the Data with Queries Consult the Data’s Owne...
in macOS Figure 20-1: US births from 1910 to 2020. Source: US National Center for Health Statistics List of Listings Listing 1-1: Checking your PostgreSQL ve...
reviewer for the first edition persist in this new version. Thank you to Investigative Reporters and Editors (IRE) and its members and staff past and present...
s, which is the code that retrieves data from your database. One benefit of using PostgreSQL is that the open source community has provided excellent guideli...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Practical SQL A Beginners Guide to Storytelling with Data (Anthony DeBarros)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Practical SQL A Beginners Guide to Storytelling with Data (Anthony DeBarros)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment