title: SQL INNER JOIN and COUNT
body: <p>I have 3 tables (user, item, userlike) and 2 sql queries. How can I unify these two queries?</p>
  
  <pre><code>SELECT item.userid, item.id, user.name FROM item 
  INNER JOIN user ON item.userid = user.id 
  
  SELECT userid,itemid, COUNT(*) AS `liked` FROM userlike
  WHERE userid=9
  GROUP BY itemid
  </code></pre>
  
  <p>I want to know whether a specific user (9) has liked the item or not.</p>
  
  <p>Result should be somthing like this</p>
  
  <pre><code>itemid userid name liked* (*whether 'user 9' liked this item or not)
  1      7      foo  0
  2      4      asd  1
  </code></pre>
  
  <p>Thanks</p>