Skip to content

Commit

Permalink
Blog: David: Learn SQL Postgres (#903)
Browse files Browse the repository at this point in the history
* Blog: David: Learn SQL Postgres

* Blog: David: Learn SQL Postgres: Alts
  • Loading branch information
dbazhenov authored May 20, 2024
1 parent ddb28c5 commit 8789cbb
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
Binary file added assets/blog/2024/05/image1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/blog/2024/05/image2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/blog/2024/05/image3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/blog/2024/05/image4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/blog/2024/05/image5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: "Learn PostgreSQL and SQL Quickly and Free"
date: "2024-05-20T00:00:00+00:00"
tags: ['Percona', 'opensource', 'PostgreSQL', 'Postgres',]
description: "Want to learn PostgreSQL? What if you could learn PostgreSQL without having to install the database, load data, find sample data, and it was free?"
authors:
- david_stokes
images:
- blog/2024/05/Roundup-May-15.jpg
---

Learn PostgreSQL and SQL Quickly and Free

Want to learn PostgreSQL? What if you could learn PostgreSQL without having to install the database, load data, find sample data, and it was free? PGExamples.com is what you are looking for.

First, let me state that I have no connection to the website or its author. I discovered PgExercises.com by accident and was impressed by its quality and completeness. I am so impressed that I am exploring a video series on it.

## Learn SQL. Learn PostgreSQL.

[PGexercises.com](PGexercises.com) is based on increasingly complex exercises based on a provided dataset. As you progress, the questions get trickier. You do not have to download and load the available data into a server to do the exercises.

There are seven groups of exercises - Basic, Joins and Subqueries, Modifying Data, Aggregates, Date, String, and Recursive. The author recommends Learning SQL by Alan Beaulieu as a reference text. Any essential book, Structured Query Language, will serve you well.

![Learn SQL. Learn PostgreSQL.](blog/2024/05/image2.jpg)

## First Exercise

The first exercise asks you to retrieve all the data from a specific table.

![Learn SQL. First Exercise 1](blog/2024/05/image4.jpg)

At the top of the screen is an entity relationship map of the tables in the database. The table requested in the exercise is named cd.facilities.

If you use the hint button (next to the Your Answer line) you will see the following:

![Learn SQL. First Exercise 2](blog/2024/05/image3.jpg)

This should be enough of a clue to allow you, with the aid of your SQL reference, to find the answer. Enter your query and click on the Eun Query button.

![Learn SQL. First Exercise 3](blog/2024/05/image1.jpg)

The green check means that the answer is correct. But what if you did not get it correct. Scroll down and select the Answers and Discussion button.

![Learn SQL. First Exercise 4](blog/2024/05/image5.jpg)

Not only do you see the answer to the question, but there is a detailed analysis of the answer.

## Video Series?

I am so impressed wth these exercises that the Percona Community Team is in discussion of creating a series of videos on them. Not only that, on of my colleagues who is learning PostgreSQL is volunteering to work through the exercises so that the series will feel like a study group. And I will comment on the query, possible alternatives when they exist, and help you work through the 'rough spots'.

If you want to work along, please do. Let us know where you struggle or the places we are redundant. Out goal is to provide a first class learning experience to help people learn SQL and PostgreSQL.

0 comments on commit 8789cbb

Please sign in to comment.