SELECT * FROM customer LEFT JOIN product ON product.customerId = customer.id # can be left, right, inner, cross joins WHERE product.customerId IS NOT NULL # which means customer id should exists