title: Invalid because it is not contained in an aggregate function or the group by clause
body: <p>I would like to create a query that gets a product from the product table, it's type and category from the type table and the count of songs on the product.
  But somehow this query throws an error. It started when I added <code>count(n.name)</code></p>
  
  <pre><code>SELECT p.name, p.publisher, p.description, p.price, p.picture
       , p.releasedate, t.type, t.category, count(n.name) AS songs
    FROM Products p
   INNER JOIN ProductType t ON (p.type_id = t.id)
   INNER JOIN Songs n ON (p.id = n.product_id)
  </code></pre>
  
  <p>The error I get is</p>
  
  <blockquote>
    <p>Column 'Products.name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.</p>
  </blockquote>