Web Books

Cover of Learn SQL

Learn SQL

Written by: Dave Fowler
Reviewed by: Matt David

Welcome to our PostgreSQL interactive SQL Tutorial! We’ve designed this specifically for tech-savvy folks to learn enough SQL to be able to do their own analysis and data fetching.

We’ve added a big innovation to our tutorial that makes it quite different: Because we believe the best way to learn SQL is by playing around, we’ve created an interactive SQLBox for you to follow along and play with writing queries from the very start.The SQLBox takes your input and runs it against a live PostgreSQL database that we’re hosting.

    Basic SQL

  • Quick Introductory SQL Concepts 

    Learn how to use SQL with your PostgreSQL database. In this interactive SQL data tutorial, get an introduction that is designed to get you querying your PostgreSQL database as quickly as possible. Learn SQL basics, tables and SQLbox.

  • SELECT 

    Learn the SELECT SQL statement with your PostgreSQL database in this interactive SQL data tutorial. The SELECT statement is a basic SQL command to access data.

  • FROM 

    This interactive SQL tutorial will explain the FROM command with syntax and use cases on how to interact with your data in the PostgreSQL database. Learn how to use the SQL FROM command by following the steps in this interactive tutorial.

  • ORDER BY 

    Learn how to use the SQL ORDER BY command in PostgreSQL. The ORDER BY command is used to sort your result data in ascending or descending order. Follow the interactive SQL tutorial to use cases and best practices for the ORDER BY command.

  • LIMIT and OFFSET 

    Learn how to LIMIT the number of results that are returned you can simply use the LIMIT SQL command at the end of the query to specify. You can use the LIMIT command on your PostgreSQL database. Read the tutorial to learn more.

  • Browsing the SCHEMA 

    SCHEMA is the collection of tables and relationships in your database. In this interactive SQL tutorial, learn how to browse a SCHEMA with PostgreSQL.

  • Basic SQL Practice Grounds 

    After you've got the basic SQL fundamentals. Put that knowledge to the test in these interactive SQL practice exercises.

    Mid-Level SQL

  • WHERE 

    Learn how to use the WHERE command in PostgreSQL. In this interactive SQL tutorial, learn the best practices of the WHERE command for analysis and exploration.

  • Operators 

    Learn about Operators in SQL and how to use them in Postgres. Operators are used to specify conditions in a SQL statement.

  • Aggregate Functions 

    Learn about the COUNT function in SQL. The COUNT command is used to returns the count of how many rows there are. This interactive SQL tutorial will teach you how to COUNT.

  • GROUP BY 

    The GROUP BY SQL statement is used to aggregate functions like COUNT, MAX, MIN, SUM and AVG. In this interactive SQL tutorial, learn to use the GROUP BY .

  • JOIN Relationships and JOINing Tables 

    A JOIN SQL statement combines two data from two tables together. In this interactive SQL tutorial, learn the most common JOIN statements.

  • DATE and TIME Functions 

    DATE and TIME values in PostgreSQL have a whole special set of functions and operators for their proper use. Learn how to use dates in PostgreSQL in this interactive SQL tutorial, so you can get the DATE and TIME of your data analysis.

  • Mid Level SQL Practice Grounds 

    After you've mastered mid-level SQL fundamentals, put that knowledge to the test in these interactive SQL practice exercises.