title: SQL count + join throws syntax error, but works ok without count
body: <p>I'm getting weird syntax error with the following query:</p>
  <pre><code>SELECT COUNT (*) 
  FROM a 
  JOIN b ON a.id = b.a_id
  </code></pre>
  <p>But querying without <code>COUNT</code> works like a charm:</p>
  <pre><code>SELECT * 
  FROM a 
  JOIN b ON a.id = b.a_id
  </code></pre>
  <p>Adding JOIN specification like INNER, LEFT, etc - doesn't help.</p>
  <blockquote>
  <p>The syntax error doesn't specify exactly what's wrong, just provides certain codes: [42000][1064]</p>
  </blockquote>
  <p>How do I fix it?</p>
  <h1>EDIT:</h1>
  <p>Here it is:</p>
  <pre><code>SELECT COUNT(customers.*) 
  FROM customers 
  JOIN customer_behaviour ON customers.id = customer_behaviour.customer_id
  </code></pre>
  <p>Deleting <code>COUNT</code> makes it totally valid. That's really weird!</p>