Data Science Texts

Discover what you don't know, and attack your weaknesses!

NB: We may earn a commission if you buy something via an affiliate link.

SQL

Strongly Recommended Prerequisites

Recommended Prerequisites

Last Updated: 8/29/2021

One of the most common locations for storing data is in a relational database, and the most common way to access and update these databases is by using SQL (Structured Query Language). SQL can be a very frustrating tool. It's inflexible compared to other languages, and it permits only simple operations, which often leads to convoluted code to accomplish conceptually simple tasks. There is an SQL standard, but compliance with that standard is uneven at best. In practice, one must learn standard SQL plus the idiosyncrasies of particular implementations. Despite these issues, SQL is so commonly used and being able to access data is so important that most data scientists simply must learn SQL. The good news is that learning to write basic, standard SQL queries really isn't that hard.

Recommended Books

  1. SQL Queries for Mere Mortals

    John L. Viescas

    Book image of SQL Queries for Mere Mortals.
    Check it out on Amazon!

    Key Features

    • In-text exercises
    • Answers to exercises

    Key Topics

    • Aggregate Functions
    • Conditional Expressions
    • DELETE Statements
    • Driver Tables
    • Expressions
    • Filtering
    • GROUP BY Extensions
    • Grouping Data
    • Handling NULLs
    • History of SQL
    • INSERT Statements
    • Inner Joins
    • Outer Joins
    • Relational Databases
    • SELECT Statements
    • Search Conditions
    • Set Operations
    • Subqueries
    • UPDATE Statements
    • Window Functions

    Description

    This is a great book to read if you really want to understand SQL querying. Viescas will teach you what relational databases are and how to organize them properly, as well as everything you could want to know about querying them with SQL. This book comes with several example databases and accompanying exercises for you to practice using SQL language features. The only real downsides of this book are that some of the exercises are ambiguously worded and the book is somewhat long. Despite these downsides, this is an excellent book for both learning and reference.

  2. Learning SQL

    Alan Beaulieu

    Book image of Learning SQL.
    Check it out on Amazon!

    Key Features

    • In-text exercises
    • Answers to exercises

    Key Topics

    • Aggregate Functions
    • Conditional Expressions
    • Filtering
    • Grouping Data
    • Indexes and Constraints
    • Joins
    • Metadata
    • Queries
    • Set Operations
    • Subqueries
    • Transactions
    • Views

    Description

    If you need to get up to speed on SQL quickly, this book is a great option. It's not as comprehensive as the top pick, and all the exercises concern the same database. However, you'll know enough SQL to be productive after reading it and it is much shorter than Viescas.