Skip to content

Day Three

🧠 Day 3 – SQL via Python: NYC School Data Exploration

Section titled β€œπŸ§  Day 3 – SQL via Python: NYC School Data Exploration”

Welcome to Day 3! Today, you’ll learn to run SQL queries from within Python β€” a powerful combo for analysis, automation, and real-world workflows at Webeet.


You’ll be working with a PostgreSQL database containing NYC school data. Your goals:

  • Connect to the database using Python
  • Write SQL queries and fetch results into pandas DataFrames
  • Analyze school patterns across boroughs, demographics, and safety metrics
  • Submit your findings in a Jupyter Notebook

This reflects how we often work at Webeet β€” combining data access and analysis in one environment.


You’ll be querying these tables:

  • high_school_directory – School names, locations, types, programs
  • school_demographics – Enrollment data, ELL, FRPL, disabilities, etc.
  • school_safety_report – Reported incidents by type and location.

You can find description of these tables here : https://docs.google.com/spreadsheets/d/1-GBa4-i2ZJqc3lWVuefVKwS6o7jVHu2WWMRBEcJn-y8/edit?usp=sharing


Clone repo to your local machine. Set up your connection in Python using one of the following as provided in the the setup guide:
πŸ“ daily_tasks/day_3/day3_sql_combined_with_creds.ipynb Make sure that connection works and you can query the data.


Complete the task following the instructions here: πŸ‘‰ Day 3 – SQL Practice via Python


  1. In your sub-branch ([your-name]/day-3), go to:
    πŸ“ daily_tasks/day_3/

  2. Add your notebook named:
    πŸ“„ day3_sql_analysis.ipynb

  3. The notebook should include:

    • Connection setup
    • SQL queries and results
    • Commentary or markdown cells explaining what each query shows
    • Summary of insights
  4. Create a Pull Request with your work

  5. Comment on the GitHub issue with a link to your PR


This task should take about 4–5 hours, including database setup time.


Have fun blending SQL with Python β€” this is where analysis becomes superpowered! πŸ’₯πŸπŸ”—