Sample SQL - Circa 2021
This repository contains a sample selection of SQL exercises and reference scripts originally created as part of a curriculum I developed to teach analysts practical SQL.
The examples are intentionally straightforward. They were designed to introduce concepts progressively and give analysts problems that could be understood in business terms before worrying about increasingly complex syntax. Topics include query construction, filtering, joins, aggregation, subqueries, data transformation, and other common analytical patterns.
One of the exercises used Scrabble as a simple way to think about data: given a dictionary of valid words, letter values, and a set of available letters, how could SQL be used to identify possible words and rank them by score?
That idea later inspired another analyst to turn the exercise into a complete project using PostgreSQL/Supabase, SQL, JavaScript, and Retool, including a database-backed interface for entering letters and returning valid Scrabble words ranked by value. The project is documented here: https://www.jsnsmn.com/scrabble-quick-list
The project’s author later traced the original idea back to my SQL curriculum, expanded it, and credited me in his write-up.
These files are preserved primarily as examples of technical instruction and curriculum design rather than as demonstrations of unusually complex SQL. The goal was to help analysts learn how to translate an understandable problem into data structures, queries, and eventually working applications.