Table of Contents
PostgreSQL Install
đ Welcome to the Advanced Section
SQL Topics to Cover

How will we be running queries?
- Running a PostgreSQL database locally on your computer
- Using VS Code to query the database
NOTE: sqlliteviz may still work for the queries here, but itâs not recommended
đ€Why are we using PostgreSQL?

PostgreSQL (pronounced "POST-gres-cue-ell" or "POST-gresâ, weâll use the latter) is the most popular database according to the Stack Overflow Developer Survey from 2023

Itâs also the most admired (the proportion of users that have used the same technology in the past year and want to continue using it) and most desired (the proportion of respondents who want to use a technology)⊠fancy talk for saying those that want to use it want to continue to use it and those that donât use it also do
Stack Overflow Developer Survey 2023
âŹïžÂ Download PostgreSQL
Why Installing?
We will be running the database locally on your computer; This is a great way to getting familiar with using databases and if you make any mistakes you can easily start over
How to Download?
PostgreSQL: Downloads
- Download Installer - https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
- Choose version 16.1 (the one we use in this course)
- NOTE: We canât guarantee everything we do here will work if you donât download that version
- Download the correct installer for your machine (Mac, Windows, Linux)
- Go to your downloads file and open the downloaded installer
- Go through the setup steps (keep default settings)
- Create a password (write it down somewhere)
- Select port number for the server: 5432 (usedefault)
- Select Locale: [Default Locale]
- Finish Installing
- Continue Installation (leave as default)
- Host: localhost
- User Name: postgres
- Password: _________ (the one you decided before)
- Port 5432
- Finish Installation
How To Run a Database in PostgreSQL
-
Use pgAdmin app to start up PostgreSQL
- The database needs to be running to query it
- Anytime you restart your computer, you need to start back up PostgreSQL
-
Inside of pgAdmin select the database to start it up
-
Click your database located under PostgreSQL 16 / Databases

b. It will turn gold once it is running

Code Editor Install
đIntro
-
Whatâs a code editor (or IDE)?
- đ Code Editor - A digital notepad for writing and organizing programming code. Easy editing, checking, and running code snippets
- đ Integrated Development Environment (IDE) - A supercharged code editor with tools for writing, testing, and fixing code all in one place. Like a code editor with a toolbelt
VS Code is a code editor packed with features like an IDE: debugging, syntax highlighting, and extensions for various programming tasks
-
Why are we using VS Code?

According to the Stack Overflow Developer Survey from 2023; VS Code is by far the most popular code editor / integrated development environment
-
What are other options for running SQL queries (not used in this course)?
DBeaver
DataGrip: The Cross-Platform IDE for Databases & SQL by JetBrains
Note: These options are database management tools specifically designed for ⊠well databases. As a data analyst, I use more than just SQL (i.e., Python), and I like to stay in the same application, so I recommend learning VS Code over these options. (Although these options are WAY more capable for handling SQL queries)
đ„ Download VS Code
- Download VS Code
đOverview of VS Code

- Activity Bar
- Provides icons for quick access to different views (Explorer, Search, Git, Debug, Extensions)
- Side Bar
- Displays additional information based on the selected view in the Activity Bar, such as file explorer for navigating files and folders, search results, source control operations, etc.
- Code Editor
- The central area where you write and edit your SQL code, featuring syntax highlighting, IntelliSense, and tabbed interface for open files
đSetup Project Folder

Weâre going to create a folder to have all of our SQL files.
- Right click on the Explorer sidebar
- Select âOpen Folderâ
- Create a new folder and name the folder:
SQL_Data_Analytics_Course
đ©Â Install Extension
- Install a PostgreSQL Extensions (Two Required)
Data Types
Manipulate Tables
Create Database (Advanced)