FDE Times dataFDE jobs open 928▲21 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 85Companies hiring 200Remote-friendly 24%Median US pay $200kTop hirer Databricks 107
中文VI

The newspaper of the Forward Deployed Engineer

Books & courses

The Learning SQL chapter FDEs need most is near the back

Read chapters 3 to 5, jump straight to chapter 15 on metadata, and save the rest of Alan Beaulieu's book for when a project demands it.

Cover of Learning SQL: Generate, Manipulate, and Retrieve Data
Learning SQL: Generate, Manipulate, and Retrieve Data · Alan Beaulieu · Cover: Open Library
ShareLinkedInFacebookX

In brief

  • The third edition of Learning SQL by Alan Beaulieu (O'Reilly, 2020, 380 pages) has self-contained chapters with exercises, so it can be read out of order
  • The FDE route: chapters 3–5 (queries, filtering, joins), then chapter 15 on metadata, followed by 7–11 and 12–14
  • INFORMATION_SCHEMA is read-only and ANSI-standard, so it is both safe on client data and usable across many engines
A strip of 18 boxes representing the chapters of Learning SQL in book order. Chapters 3 to 5 in dark blue are step 1, chapter 15 (Metadata) in orange is step 2, chapters 7 to 11 and 12 to 14 in light blue are steps 3 and 4, and chapters 16 to 18 are left for later.
An FDE should read chapters 3–5 first, then jump to chapter 15 on INFORMATION_SCHEMA, the read-only part a database uses to describe itself. Source: Learning SQL, third edition, contents page (O'Reilly, 2020), per the article.

Of the 380 pages in Learning SQL: Generate, Manipulate, and Retrieve Data, the chapter most useful to a Forward Deployed Engineer facing a client’s database comes 15th. It is called Metadata, and it sits between Views (chapter 14) and Analytic Functions (chapter 16).

The book is the third edition, written by Alan Beaulieu and published by O’Reilly Media on March 4, 2020 (ISBN-13 9781492057581). The publisher’s description opens with an argument close to FDE work: companies are taking in ever more data, and you need to be able to put it to use right away.

That is usually the first job at a new client. You are given access to a database you have never seen, and you have to answer a business question before writing a single line of integration code.

So the book is best read in the order the work happens rather than the order of its contents page. Each chapter is a self-contained lesson with its own exercises, so skipping ahead leaves no gaps.

Three chapters are enough to start asking questions

Chapter 3 (Query Primer), chapter 4 (Filtering) and chapter 5 (Querying Multiple Tables) are the core. They teach SELECT, WHERE and basic joins, which covers almost every question you will put to a client’s data in the first week. Chapter 6, on set operations, can be skimmed.

Knowing how to join is still not enough, because a join requires knowing which table connects to which. At a client, an up-to-date relationship diagram is rarely there to lean on. That is why the next step is chapter 15.

Chapter 15 is the map of an unfamiliar schema

The Metadata chapter is about INFORMATION_SCHEMA. According to the MySQL documentation, it tells you database and table names, the data type of each column and access privileges. The database describes itself; you only need to know how to ask.

The detail that matters most to an FDE is a single line in the MySQL documentation: these tables can only be read, with no INSERT, UPDATE or DELETE. On a client’s production system, a place where you can poke around freely without being able to break anything is rare.

Take a hypothetical logistics company that gives you read access to a database with hundreds of tables and asks: how many orders does each customer have in each status? The first query does not touch order data at all. It looks for columns that might serve as join keys:

SELECT table_name, column_name, data_type
FROM information_schema.columns
WHERE column_name LIKE '%customer%'
ORDER BY table_name;

Say the results show two candidates: a customers table with a customer_id column, and an orders table that also has customer_id, both of the same data type. Matching types are the first sign that this is the right pair of keys. Before going further, ask once more to see what other columns orders contains:

SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'orders'
ORDER BY ordinal_position;

The list gives you a status column to group by and a date column such as created_at to limit the scope. Only now do you touch the real data, using the joins of chapter 5 and the GROUP BY of chapter 8:

SELECT c.customer_id, o.status, COUNT(*) AS order_count
FROM orders o
JOIN customers c ON c.customer_id = o.customer_id
WHERE o.created_at >= '2026-11-01'
GROUP BY c.customer_id, o.status
ORDER BY c.customer_id, o.status;

Three queries make a complete loop: metadata supplies the map, the join connects the two tables, and the aggregate answers the client’s question. The narrow date filter keeps the first run light; once the numbers look sensible, widen the window.

The skill travels to other engines

The descriptions of INFORMATION_SCHEMA above come from the MySQL documentation, and your client may run a different engine. But the information schema is a set of read-only views defined by the ANSI standard, and MySQL is only one of many systems that implement it.

Wikipedia’s list of database systems that support it includes PostgreSQL, Microsoft SQL Server, MySQL, MariaDB, Snowflake and Amazon Redshift, which covers many of the engines you are likely to meet at clients.

Time spent on chapter 15 therefore pays off far better than time spent memorizing one engine’s dialect. A few column names or extension views may differ, but the method stays the same: list the tables, read the columns, infer the relationships, then query.

Read the rest as you need it

Once you have the map, chapters 7 to 11 are the next step for analytical queries. They cover data generation and manipulation, grouping and aggregates (chapter 8), subqueries (chapter 9), advanced joins (chapter 10) and conditional logic (chapter 11). This is the toolkit for questions such as counting by customer or by status, or flagging late orders.

Chapters 12 to 14 cover Transactions, Indexes and Constraints, and Views. This is the part that helps you read production data safely: knowing which constraints govern the data, and why a query that scans a large table can slow down a client’s system.

The last three chapters, Analytic Functions, Working with Large Databases and SQL and Big Data, are new in the third edition. Save them for when the project moves to a large data warehouse.

The easy mistake in a client’s database

The mistake most worth avoiding is running a GROUP BY that scans the whole orders table on production before you know what indexes it has. Read chapter 13 before writing analytical queries, test on a narrow time range, and only then expand.

If you are trying to move into an FDE role, turn this route into an interview answer: faced with an unfamiliar database, read the metadata first, join second, aggregate last. A clear sequence like that, backed by scripts you have written, says more than knowing the syntax by heart.

People who write SQL every day can skip the first half of the book. Chapter 15 is still worth reading, because at a client the first question is always what this database actually contains.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
3 sources
Read next on the roadmap · Stage 1: FoundationsFor a client's TypeScript repo, Matt Pocock's chapter 14 comes firstTotal TypeScript Essentials is free to read online; the similarly named Pro Essentials course, with more than 200 exercises, is the part you pay for.