PostgreSQL is a free, open-source SQL database. It’s an alternative to MySQL and is used by small projects as well as larger companies.

Learning the Basics

59 Best Resources for Learning SQL: A large list of other places to learn SQL

19 Best Database Books: a list of books on database-related topics

SQL Roadmap: a guide on SQL topics from beginner to advanced.

PostgreSQL vs MySQL: An analysis of the differences between PostgreSQL and MySQL.

Why Use Postgresql?: An article explaining why you may want to use PostgreSQL.

Basic SQL Statements

Data Manipulation

SELECT Statement Guide: view data in a table

INSERT Statement Guide: add data to a table

UPDATE Statement Guide: modify data in a table

DELETE Statement Guide: remove data from a table


WHERE Clause: filter data from your query

ORDER BY Clause: specify the order of the results of a Select query

GROUP BY: allows you to group data by values in a column and use aggregate functions

HAVING Clause: allows you to filter data after a group has been applied

DISTINCT: eliminate duplicate rows from your results


Create Table guide: create a new table on the database

Alter Table guide: make changes to an existing table

Drop Table guide: remove a table from the database

Truncate Table guide: remove all data from a table

Additional SQL Features

Operators: perform calculations and operations on data

Set Operators: combine results from two queries into one

CASE Statement: use conditional (if then else) logic in a query



Joins guide: a guide to joins which are how you combine multiple tables together in a query

One to One joins (video): definition of this join type and an example

One to Many joins (video): definition of this join type and an example

Many to Many joins (video): definition of this join type and an example

Self Join (video): definition of this join type and an example



Aggregate Functions: functions that aggregate data into one or more rows

Analytic Functions: functions that let you analyse data across multiple rows



There are many more objects in a database besides tables. Learn all about them in these guides.

Indexes: a guide to Indexes in SQL

Constraints: rules that can be set on your data

Keys: surograte, natural, primary, foreign, composite, and more

Stored Procedures: a guide to stored procedures in SQL

Views and Materialised Views: objects that let you view data in certain ways

Database Schema: an explanation of this term

Temporary Tables: what it is and how to create one


Further Learning

More features and topics in SQL and PostgreSQL database.

Glossary of Terms: A definition of many terms used in SQL and database development

Data Types: a guide to data types in many different databases

Interview Questions and Answers: a list of 69 interview questions and answers, plus interview tips

DML, DDL, and TCL: a list of SQL commands and what DDL, DML, and TCL mean

Aliases: A guide to column aliases and table aliases in SQL

Subqueries: a guide to subqueries, what they are, and many different examples.

Limiting Results: a guide to SQL row limiting and Top-N queries

CTE (WITH Clause): a guide to Common Table Expressions (CTEs) aka the WITH clause

Transactions and Isolation Levels: an explanation of transactions in SQL and what isolation levels are

Concatenate: what concatenation is and how to do it in SQL

Booleans: how SQL handles booleans and how you can implement them

Wildcards: An explanation of what wildcards are and how to use them

Null: a guide on what NULL is and how to handle them in SQL

Data Warehouses: an in-depth guide to data warehouses

Comments: a guide to comments in SQL and why they can help

Database Version Control, CI, and CD: An in-depth guide on database version control, continuous integration, and continuous deployment

How To

A collection of articles detailing how to do common tasks in SQL queries.

Select Rows with a Max Value: how to select rows with a maximum value for a column

List Tables in a Database: how to list all the tables in a database or a schema

Escape Single Quotes: how to escape single quotes in SQL

Remove Duplicate Records: how to remove duplicate records in SQL


Here’s a compilation of reference lists that can be useful when working with PostgreSQL.

42 ETL Tools: a list of 42 different ETL tools.

51 SQL IDEs and Editors: a list of many different SQL editors to let you write SQL code and much more.