title: SQL group by missing expression
body: <p>Assume i have two table (attributes are in parentheses).</p>
  
  <ol>
  <li><strong>products</strong> (pid, releasedate, productname, price, description)</li>
  <li><strong>sells</strong> (sellid, sellproductid, selluserid, selldate, selltype)</li>
  </ol>
  
  <p>From this the output will result to this problem: <strong>"Show all products with each total sell"</strong><br>I wrote this SQL query with no luck:</p>
  
  <pre><code>select pid, productname, price, count(pid) from products p, sells s having p.pid = s.sellproductid group by pid;
  </code></pre>
  
  <p>Sound like the group by is not working, with sql minor knowledge i can't understand how to fix this...any idea?</p>