Download Practical SQL: A Beginner’s Guide to Storytelling with Data PDF

Practical SQL: A Beginner’s Guide to Storytelling with Data
Name: Practical SQL: A Beginner’s Guide to Storytelling with Data
Pages: 388
Year: 2018
Language: English
File Size: 4.5 MB
Downloads: 0
Page 5

PRACTICAL SQL. Copyright 2018 by Anthony DeBarros. All rights reserved. No part of this work may be reproduced or transmitt ed in any form or by any means, electronic or mechanical, including photocopying, recording, or by any i nformation storage or retrieval system, without the prior written permission of the copyright owner and the publisher. 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 con tact No Starch Press, Inc. directly: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 1.415.863.9900; [email protected] www.nostarch.com Library of Congress Cataloging in Publication Data Names: DeBarros, Anthony, author. Title: Practical SQL : a beginner's guide to storytelling with data / An thony DeBarros. Description: San Francisco : No Starch Press, 2018. | Includes index. Identifiers: LCCN 2018000030 (print) | LCCN 2017043947 (ebook) | ISB N 9781593278458 (epub) | ISBN 1593278454 (epub) | ISBN 978159327827 4 (paperback) | ISBN 1593278276 (paperback) | ISBN 9781593278458 ( ebook) Subjects: LCSH: SQL (Computer program language) | Database design. | B ISAC: COMPUTERS / Programming Languages / SQL. | COMPUTERS / Database Manag ement / General. | COMPUTERS / Database Management / Data Mining. Classification: LCC QA76.73.S67 (print) | LCC QA76.73.S67 D44 2018 (e book) | DDC 005.75/6 dc23 LC record available at https://lccn.loc.gov/2018000030 No Starch Press and the No Starch Press logo are registered trademarks o f No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of thei r respective owners. 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. The information in this book is distributed on an "As Is" basis, w ithout warranty. While every precaution has been taken in the preparation of this work, neither the author nor N o Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage cau sed or alleged to be caused directly or indirectly by the information contained in it.


Page 8

BRIEF CONTENTS Foreword by Sarah Frostenson.........................................xvii Acknowledgments .................................................xxi Introduction......................................................xxiii Chapter 1: Creating Your First Database and Table...........................1 Chapter 2: Beginning Data Exploration with SELECT .........................11 Chapter 3: Understanding Data Types ...................................23 Chapter 4: Importing and Exporting Data.................................39 Chapter 5: Basic Math and Stats with SQL ................................55 Chapter 6: Joining Tables in a Relational Database ..........................73 Chapter 7: Table Design That Works for You ..............................93 Chapter 8: Extracting Information by Grouping and Summarizing ...............113 Chapter 9: Inspecting and Modifying Data...............................129 Chapter 10: Statistical Functions in SQL .................................155 Chapter 11: Working with Dates and Times ..............................171 Chapter 12: Advanced Query Techniques ...............................191 Chapter 13: Mining Text to Find Meaningful Data..........................211 Chapter 14: Analyzing Spatial Data with PostGIS ..........................241 Chapter 15: Saving Time with Views, Functions, and Triggers..................267 Chapter 16: Using PostgreSQL from the Command Line ......................291 Chapter 17: Maintaining Your Database ................................313 Chapter 18: Identifying and Telling the Story Behind Your Data.................325 Appendix: Additional PostgreSQL Resources..............................333 Index .........................................................337


Page 10

CONTENTS IN DETAIL FOREWORD by Sarah Frostenson xvii A CKNOWLEDGMENTS xxi I NTRODUCTION xxiii What Is SQL? ................................................... .xxiv Why Use SQL? .................................................. .xxiv About This Book...................................................xxv Using the Book's Code Examples......................................xxvii Using PostgreSQL.................................................xxviii Installing PostgreSQL........................................xxviii Working with pgAdmin.......................................xxxi Alternatives to pgAdmin......................................xxxiii Wrapping Up .................................................. .xxxiii 1 C REATING YOUR FIRST D ATABASE AND TABLE 1 Creating a Database ................................................3 Executing SQL in pgAdmin......................................3 Connecting to the Analysis Database...............................5 Creating a Table ...................................................5 The CREATE TABLE Statement....................................6 Making the teachers Table......................................7 Inserting Rows into a Table ............................................8 The INSERT Statement .........................................8 Viewing the Data ............................................9 When Code Goes Bad...............................................9 Formatting SQL for Readability ........................................10 Wrapping Up ....................................................10 Try It Yourself.....................................................10 2 B EGINNING D ATA E XPLORATION WITH SELECT 11 Basic SELECT Syntax ...............................................12 Querying a Subset of Columns..................................13 Using DISTINCT to Find Unique Values ............................14 Sorting Data with ORDER BY..........................................15 Filtering Rows with WHERE...........................................17 Using LIKE and ILIKE with WHERE................................19 Combining Operators with AND and OR...........................20 Putting It All Together ...............................................21 Wrapping Up ....................................................21 Try It Yourself.....................................................22


Tags: Download Practical SQL: A Beginner’s Guide to Storytelling with Data PDF, Practical SQL: A Beginner’s Guide to Storytelling with Data free pdf download, Practical SQL: A Beginner’s Guide to Storytelling with Data Pdf online download, Practical SQL: A Beginner’s Guide to Storytelling with Data 2018 download, Practical SQL: A Beginner’s Guide to Storytelling with Data.pdf, Practical SQL: A Beginner’s Guide to Storytelling with Data read online.
About | Contact | DMCA | Terms | Privacy | Mobile Specifications
Copyright 2021 FilePdf