Real questions span tables: orders and customers, events and users. Joins put them back together.
Inner join
Rows that match on both sides:
SQL
SELECT c.name, o.amount
FROM orders o
JOIN customers c ON c.id = o.customer_id;
Left join
Keep every row on the left, matched or not — the go-to for "including the ones with zero":
SQL
SELECT c.name, count(o.order_id) AS orders
FROM customers c
orders o o.customer_id c.id
c.name;