CS145 Logo

CS 145

Fall 2026 • Intro to Big Data Systems

PSET 1: SQL

Module 1: SQL

This PSET covers Module 1: SELECT, JOINs, GROUP BY, NULLs, HAVING, set operators, subqueries, CTEs, and window functions. Before starting, you should have read the Module 1 content, attended the lectures, and completed the SQL Colab walkthrough in your CA section.

Postgres note: Some queries use CAST(... AS NUMERIC) inside ROUND(). This is a Postgres requirement for rounding floats — focus on the SQL logic, not the cast.

Spotify Database

All questions use these three tables. Click any table to enlarge.