title: SqlAlchemy Left Join with count
body: <pre><code>class Employee
      id
      name
  
  class Location
      id
      city
  
  class Work
      id
      employee_id
      location_id
  </code></pre>
  
  <p>Todo: Left join with count (including zero)</p>
  
  <p>Desired result</p>
  
  <pre><code>    location.city count
      NYC 10
      SFO 5
      CHI 0
  </code></pre>
  
  <p>Raw Query:</p>
  
  <pre><code>    select location.id, count(work.id) as count
      from location 
      left join work
      on location.id = work.location_id
      group by location.id
  </code></pre>
  
  <p>SqlAlchemy:</p>
  
  <pre><code>    db_session.query(Location, func.count.work_id).label('count')). \
                  filter(location.id == work.location_id). \
                  group_by(location._id). \
  </code></pre>
  
  <p>What is the right way to specify columns in select while doing a left join?</p>