Skip to content
Module
Product and data

SQL for product managers

SQL (Structured Query Language) is the standard language for querying relational databases and data warehouses. A query describes the result you want, which tables to read and how to filter, group and join them, and the database works out how to compute it. Most product questions, such as how many accounts activated last month or which plan churns most, fit in a few lines of SQL.

Why it matters for a PM

A PM who can read and write basic SQL answers simple questions without waiting in a data team's queue, and asks better questions when the analysis is complex. The real skill is less the syntax than knowing what each table represents and checking that a number is right before sharing it, including when an AI assistant wrote the query.

Example

To find how many workspaces activated last month, a PM counts distinct workspaces with at least one invoice sent within seven days of sign-up, grouped by acquisition channel. Before sharing the figure, they check it against the dashboard total and look at a few rows by hand.

Key points

  • SELECT, WHERE, GROUP BY, ORDER BY and JOIN cover most day-to-day product questions.
  • Before joining, find out what a single row stands for in each table: a user, an event, an order.
  • NULL values and time zones are classic sources of wrong totals.
  • Work with read-only access and only the personal data you actually need.

Common mistakes

  • Joining tables at different grains and counting duplicated rows.
  • Using an INNER JOIN where a LEFT JOIN was needed, which silently drops records.
  • Computing a metric such as “active user” differently from the team's shared definition.

Go further with Module

The courses and lessons that cover this concept: