


The information in this book is distributed on an “As Is” basis, without warranty.

Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Other product and company names mentioned herein may be the trademarks of their respective owners. Classification: LCC QA76.73.S67 (print) | LCC QA76.73.S (ebook) | DDC 005.75/6-dc23 LC record available at No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. | COMPUTERS / Database Management / Data Mining. | COMPUTERS / Database Management / General. | BISAC: COMPUTERS / Programming Languages / SQL. Description: San Francisco : No Starch Press, 2018. Title: Practical SQL : a beginner's guide to storytelling with data / Anthony DeBarros. 245 8th Street, San Francisco, CA 94103 phone: 1.415.863.9900 Library of Congress Cataloging-in-Publication Data Names: DeBarros, Anthony, author. ISBN-10: 1-59327-827-6 ISBN-13: 978-1-59327-827-4 Publisher: William Pollock Production Editor: Janelle Ludowise Cover Illustration: Josh Ellingson Interior Design: Octopod Studios Developmental Editors: Liz Chadwick and Annie Choi Technical Reviewer: Josh Berkus Copyeditor: Anne Marie Walker Compositor: Janelle Ludowise Proofreader: James Fraleigh For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. PRACTICAL SQL A Beginner’s Guide to Storytelling with Data PostgreSQL Utilities, Tools, and Extensions. Identify Key Indicators and Trends over Time. Recovering Unused Space with VACUUM.īacking Up and Restoring Your Database. Setting Up the Command Line for psql.Īdditional Command Line Utilities to Expedite Tasks. Programming Your Own Functions.Īutomating Database Actions with Triggers.ġ6.

Saving Time with Views, Functions, and Triggers. Installing PostGIS and Creating a Spatial Database.Ĭreating Spatial Objects with PostGIS Functions.Īnalyzing Farmers’ Markets Data. Matching Text Patterns with Regular Expressions.įull Text Search in PostgreSQL.ġ4. Using CASE in a Common Table Expression.įormatting Text Using String Functions. Manipulating Dates and Times.Ĭalculations with Dates and Times. Improving Performance When Updating Large Tables.Ĭreating a Census Stats Table.Ĭalculating Rates for Meaningful Comparisons.ĭata Types and Functions for Dates and Times. Using Transaction Blocks to Save or Revert Changes. Importing Data on Meat, Poultry, and Egg Producers. Extracting Information by Grouping and Summarizing.Ĭreating the Library Survey Tables.Įxploring the Library Data Using Aggregate Functions. Naming Tables, Columns, and Other Identifiers.Ĭontrolling Column Values with Constraints. Using NULL to Find Rows with Missing Values. Importing and Exporting Through pgAdmin.ĭoing Math Across Census Table Columns.Īggregate Functions for Averages and Sums. Importing a Subset of Columns with COPY.Īdding a Default Value to a Column During Import. Importing Census Data Describing Counties. Transforming Values from One Type to Another with CAST.Ĥ. Using the interval Data Type in Calculations. Creating Your First Database and Table.įormatting SQL for Readability.
