title: LEFT JOIN with condition in WHERE clause
body: <pre><code>SELECT
      supplies.id,
      supplierId,
      supplies.date,
      supplies.commodity,
      supplier_payments.date AS paymentDate,
  FROM
      supplies
  INNER JOIN suppliers ON suppliers.id = supplies.supplierId
  LEFT JOIN supplier_payments ON supplier_payments.supplyId = supplies.id
  WHERE supplier_payments.isDeleted = 0 AND supplierId = 1
  </code></pre>
  
  <p>What I am trying is to get all records from <code>supplies</code> table and related records from <code>supplier_payments</code> but the <code>supplier_payments.isDeleted</code> should be equal to 0. What happens now that I only get records from supplies that have at least one supplier payment because of the condition. Is there a way to get all supply records and supply payments with condition?</p>