Skip to content

An iPython notebook for illustrating the basics of SQL

Notifications You must be signed in to change notification settings

usernamenumber/SQLBasics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This notebook is intended to provide a non-comprehensive introduction to SQL and relational database concepts.

Specifically, it was created to show a person with some technical background but no familiarity with SQL everything needed to construct queries to address use cases like:

  • Given a table of event logs associated with users, I need to see events triggered by a specific set of users
  • Given a table of event logs associated with users, I need the set of users assocaited with a specific event recorded during a given period of time

To address these use cases, the document will cover:

  • Basic relational database structure
  • SELECTing columns from a table
  • ORDERing and LIMITing column data
  • GROUPing and aggregating column data
  • Filtering results to show only columns WHERE the value matches one or more criteria, including being IN a given list
  • JOINing tables together

Setup

  1. Install JupyterLab if you haven't already
  2. Clone this repo
  3. Install other dependencies: pip install -r requirements.txt
  4. Start the notebook: jupyter-lab SQLBasics.ipynb

Viewing the notebook

Best viewed in Binder (be patient, it will take a while for this link to fully load!)

About

An iPython notebook for illustrating the basics of SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published