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. The book focuses on using SQL to find the story your data tells, with the popular open-source database PostgreSQL and the pgAdmin interface as its primary tools.
You’ll first cover the fundamentals of databases and the SQL language, then build skills by analyzing data from the U.S. Census and other federal and state government agencies. With exercises and real-world examples in each chapter, this book will 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
- Define the right data types for your information
- Aggregate, sort, and filter data to find patterns
- Use basic math and advanced statistical functions
- Identify errors in data and clean them up
- Import and export data using delimited text files
- Write queries for geographic information systems (GIS)
- Create advanced queries and automate tasks
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.
This book uses PostgreSQL, but the SQL syntax is applicable to many database applications, including Microsoft SQL Server and MySQL.
|Publisher:||No Starch Press|
|Product dimensions:||7.00(w) x 9.20(h) x 1.00(d)|
About the Author
Anthony DeBarros is an award-winning journalist who's combined avid interests in data analysis, coding, software product development, and storytelling for much of his career. He's currently a data news editor for the Wall Street Journal, focusing on topics including the economy, trade, the U.S. Census, and politics. He previously held positions with USA TODAY, the Poughkeepsie Journal, and the DocumentCloud project for Investigative Reporters and Editors.
Table of Contents
Chapter 1: Creating your first database & 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
Chapter 6: Joining Tables in a Relational Database
Chapter 7: Table Design that Works for You
Chapter 8: Grouping and Summarizing Data
Chapter 9: Cleaning , Modifying, Deleting Data
Chapter 10: Ranks, Rates, asnd Stats
Chapter 11: Dealing with Dates
Chapter 12: Advanced Queries
Chapter 13: Full-Text Search
Chapter 14: GIS
Chapter 15: Views
Chapter 16: Working from the command line
Chapter 17: Maintenance
Appendix A: Alternative software and text editors
Appendix B: Solutions