pg-dock-sql

Refine your SQL skills using pg-dock-sql—a PostgreSQL Docker environment for hands-on coding challenges and solutions. This helps to elevate your proficiency in SQL through handson experience.

Table of Contents

Pre-Requisites

Setup

Verify Installation

How to extend?

Create artifacts required

Under scripts folder , create a folder structures in the format exercise-<some_number>. For e.g., example-111

    ├── exercise-111
    │   ├── code
    │   │   └── setup.sql
    │   │   ├── expected.sql
    │   │   └── solution.sql
    │   ├── README.md
    │   └── tests
    │       └── test1.sql

Validating your solution

Execute the command sh check-solution.sh <some_number> on your system to validate the solution. This script will establish a connection with the PostgreSQL Docker container, execute your provided solution, and display both the expected and actual outputs. some_number can be any number between 101 to 200

validate solution

Stop the environment

Execute the command sh stop-environment.sh to halt the containers when you are not actively working on them.

Cleanup the environment

Execute the command sh cleanup-environment.sh to cleanup the environment (containers, networks, images, volumes etc) permanently.