Felix Reyes
Back to Felix Reyes

The book companion

From the page
to the query.

Everything you need to work through the examples in ANSI SQL for FP&A Analysts. Start with the teaching database, then explore the queries one chapter at a time.

Download the companion pack

Schema, sample data, chapter listings, and guided labs in one ZIP file.

Download companion files
Version 1.0ZIP · 813 KBOctober 2, 2026
  • 18Chapters of SQL listings, plus the appendices
  • 25Tables of synthetic finance data
  • 143Runnable read queries
  • 6Guided practice labs

Also included: a data dictionary, CSV exports, setup instructions, expected results, and automated checks.

Your first query.

  1. Download and unzip the pack.Read the included README for connection options and the data guide.
  2. Create an empty PostgreSQL practice database.The pack was tested with PostgreSQL 16.13.
  3. Load the schema and sample data.Run schema.sql, followed by seed_data.sql, in your SQL editor.
  4. Check that the data loaded.
    SELECT COUNT(*) FROM gl_entries;
    -- Expected: 12480
    
    SELECT COUNT(*) FROM revenue;
    -- Expected: 1503
Which query files should I run?

Start with examples/ or runnable_queries/. The original chapter listings include fragments and intentionally flawed teaching examples. Use the query index to select individual listings; don’t execute a whole chapter file as one batch.

Will the results match every number in the book?

The sample data exercises the queries, but the book’s illustrative figures are not all reproduced. Expected outputs for the starting reports are included. The baseline uses USD and complete 2024–2025 activity.

Can I use another SQL database?

The book focuses on portable SQL. This pack is tested on PostgreSQL 16.13; other engines may need adjustments. The included compatibility notes explain the differences.

What has been checked?

The release passed 278 checks covering data integrity, accounting relationships, runnable queries, and practice labs. All business data is synthetic.