/sql_zero_to_hero

The Complete SQL Bootcamp: Go from Zero to Hero @ Udemy

Primary LanguageHTML

SQL Bootcamp: Go from Zero to Hero

Loosely follows the Udemy course The Complete SQL Bootcamp: Go from Zero to Hero led by instructor Jose Portilla.

Minimum Requirements

Recommended Requirements

Quickstart

  • Clone the repository via git clone https://github.com/pythoninthegrass/sql_zero_to_hero.git
  • Change into the directory via cd sql_zero_to_hero
  • Copy .env.example to .env and update the values
  • Run docker-compose up -d to start the PostgreSQL and Python containers
  • Exec into either
    # python
    docker exec -it python-udemy bash
    
    # postgres
    docker exec -it postgres-udemy bash
  • To exit the container, type exit, and hit Return
  • Connect to the PostgreSQL container via either pgadmin or TablePlus
    • For the latter, it'll look like this: TablePlus TablePlus
  • Once finished, run docker-compose stop to stop the containers
  • To remove the containers, run docker-compose down --volumes

TODO

  • Test the main.py script. e.g.:
    λ docker exec -it python-udemy bash
    root@python-udemy:/app# ./main.py
    Traceback (most recent call last):
    File "/app/./main.py", line 24, in <module>
        cur.execute("SELECT * FROM payment")
    psycopg2.errors.UndefinedTable: relation "payment" does not exist
    LINE 1: SELECT * FROM payment
                        ^
  • Complete course
  • Organize sections with relevant SQL files and notes