GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - anthonydb/practical-sql: Code and Data for the First Edition of "Practical SQL" by Anthony DeBarros, published by No Starch Press (2018).

BranchesTags
Open more actions menu

Latest commit

 

History

219 Commits
219 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/ISSUE_TEMPLATE
.github/ISSUE_TEMPLATE
 
 
Chapter_01
Chapter_01
 
 
Chapter_02
Chapter_02
 
 
Chapter_03
Chapter_03
 
 
Chapter_04
Chapter_04
 
 
Chapter_05
Chapter_05
 
 
Chapter_06
Chapter_06
 
 
Chapter_07
Chapter_07
 
 
Chapter_08
Chapter_08
 
 
Chapter_09
Chapter_09
 
 
Chapter_10
Chapter_10
 
 
Chapter_11
Chapter_11
 
 
Chapter_12
Chapter_12
 
 
Chapter_13
Chapter_13
 
 
Chapter_14
Chapter_14
 
 
Chapter_15
Chapter_15
 
 
Chapter_16
Chapter_16
 
 
Chapter_17
Chapter_17
 
 
Misc
Misc
 
 
Try_It_Yourself
Try_It_Yourself
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
faq-updates-errata.md
faq-updates-errata.md
 
 
resources.md
resources.md
 
 

Repository files navigation

Practical SQL: A Beginner's Guide to Storytelling with Data

Practical SQL by journalist and data analyst Anthony DeBarros is a beginner-friendly guide to the database programming language SQL. Starting with SQL basics, you'll work through intermediate and advanced topics including statistics, aggregation, cleaning data, GIS and automating tasks. Along the way, you'll use real-world data from the U.S. Census and other government agencies and learn the fundamentals of good database design. This book is ideal for beginners as well as those who know some SQL and want to go deeper.

A Note About Editions

This repository is for the First Edition of Practical SQL, published in 2018. If you're reading the Second Edition, published in 2022, you must use the code and data in the second edition repository. If the cover of your copy does not say, "2nd Edition," then you're using the first edition.

Who Is This Book For?

Practical SQL is ideal for beginners as well as those who know some SQL and want to go deeper.

Which Database Does The Book Use?

We use PostgreSQL, which is free and open source. PostgreSQL is used by some of the world's largest companies. Its SQL syntax adheres closely to the ANSI SQL standard, and the concepts you learn will apply to most database management systems, including MySQL, Oracle, SQLite, and others. Note that Microsoft SQL Server employs a variant of SQL called T-SQL, which is not covered by Practical SQL.

What's In This Repository?

Code: All the SQL statements and command-line listings used in each chapter, organized by chapter folders.

Data: CSV files and GIS shapefiles for you to import, also organized by chapter. NOTE! See the warning below about opening CSV files with Excel or text editors in the section on Getting the Code and Data.

Exercises: The "Try It Yourself" questions and answers for each chapter, listed separately. Try working through the questions before peeking at the answers!

FAQ, Updates, and Errata: Answers to frequently asked questions, updates, and corrections are noted at faq-updates-errata.md.

Resources: Updates to the book's Appendix on Additional PostgreSQL Resources at resources.md.

Chapters

  • Chapter 1: Creating Your First Database and Table
  • Chapter 2: Beginning Data Exploration with SELECT
  • Chapter 3: Understanding Data Types
  • Chapter 4: Importing and Exporting Data
  • Chapter 5: Basic Math and Stats with SQL
  • Chapter 6: Joining Tables in a Relational Database
  • Chapter 7: Table Design That Works for You
  • Chapter 8: Extracting Information by Grouping and Summarizing
  • Chapter 9: Inspecting and Modifying Data
  • Chapter 10: Statistical Functions In SQL
  • Chapter 11: Working With Dates and Times
  • Chapter 12: Advanced Query Techniques
  • Chapter 13: Mining Text to Find Meaningful Data
  • Chapter 14: Analyzing Spatial Data with PostGIS
  • Chapter 15: Saving Time with Views, Functions, and Triggers
  • Chapter 16: Using PostgreSQL from the Command Line
  • Chapter 17: Maintaining Your Database
  • Chapter 18: Identifying and Telling the Story Behind Your Data
  • Appendix: Additional PostgreSQL Resources

Getting the Code and Data on Your Computer

Non-GitHub Users

You can obtain all the code and data at once by downloading this repository as a .zip file. To do that:

  • Click the Code button at top right.
  • Click Download ZIP
  • Unzip the file on your computer. Place it in a directory that's easy to remember so you can reference it during the exercises that include importing data to PostgreSQL.

Warning about CSV files!: Opening CSV files with Excel could lead to data loss. Excel will remove leading zeros from numbers that are intended to be stored as text, such as zip codes. If you wish to view the contents of a CSV file, only do so with a plain-text editor and be careful not to save the file in an encoding other than UTF-8 (e.g., Notepad.exe on Windows defaults to ANSI).

GitHub Users

GitHub users may want to clone the repository locally and occasionally perform a git pull to receive any updates.

Where Can I Buy the Book?

Practical SQL is published by No Starch Press and available in PDF, .mobi, .epub, and classic print formats.

How Can I Get Help?

Questions? Please email [email protected]. You can also open an issue in this repository.

About

Code and Data for the First Edition of "Practical SQL" by Anthony DeBarros, published by No Starch Press (2018).

Topics

data-analysispostgresqlsql

Resources

Readme
License
Activity

Stars

702 stars

Watchers

44 watching

Forks

412 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.