title: How to write a condition for a table in an outer join?
body: <p>I would like to display all sessions with the date, which is taken from the <code>schedule_session</code> table by joining it, and filtering by <code>class_id.</code>   </p>
  
  <pre><code>select * from sessions s 
  left join schedule_session ss on ss.session_id = s.id 
  where ss.class_id = 5
  </code></pre>
  
  <p>This query does not return all sessions because I am saying where <code>class_id = 5</code> so it returns only specific class sessions. Is there any method that I can first get all sessions and show in the <code>date</code> property, and the date from the <code>schedule_session</code> if it exists for that particular session. So in the end I have all sessions but haven't assigned any <code>date</code> for it.</p>
  
  <p>So I want all sessions and show the value of <code>date</code> if it exists for that class, if not show date as <code>null</code> or <code>blank</code>.</p>
  
  <p>Thanks</p>