title: MySQL return 0 if table doesn't have specific entry
body: <p>Wasn't sure how to word my question, so sorry if it's a little confusing. Hopefully the below will clear it up a bit.</p>
  
  <p>Here's the query I'm running so far:</p>
  
  <pre><code>select business.name, ifnull(sum(checkin.count),0) as checknum from checkin inner join business on business.id = checkin.business_id where business.state = 'NY' group by business.name order by checknum desc;
  </code></pre>
  
  <p>and it <em>almost</em> works as intended. There is one more business in NY, which doesn't have any counts in the checkin table, but I can't get it to output.</p>
  
  <p>This is my current output:</p>
  
  <p><code>+---------------------------------------+----------+
  | name                                  | checknum |
  +---------------------------------------+----------+
  | Lakeside Coffee                       |       31 |
  | McDonalds                             |       18 |
  | Valero                                |       15 |
  | Angelo's Pizza &amp; Grill                |       13 |
  | Gino's Pizza                          |        8 |
  | Sandy's Deli                          |        7 |
  | Tribeca North Luxury Apartments Homes |        2 |
  | Matt &amp; Nat                            |        2 |
  | Filion's Diner                        |        2 |
  | Squirrel's Nest Restaurant and Bar    |        2 |
  | Best Friends Family Diner             |        1 |
  | China Buffet                          |        1 |
  | Sandi's Kountry Kitchen               |        1 |
  | Dick's Country Store                  |        1 |
  +---------------------------------------+----------+</code></p>
  
  <p>But I need to capture the last business that doesn't have any checkins. Not sure how to tackle this further.</p>