title: ORA-00979: not a GROUP BY expression
body: <p>Why does this work</p>
  
  <pre><code>SELECT DISTINCT FIRSTNAME, LASTNAME
  FROM books, CUSTOMERS, orders, orderitems
  WHERE STATE IN('FL ', 'GA')
  GROUP BY orders.order#, firstname, lastname
  HAVING SUM(retail*quantity) &gt; 80  
  </code></pre>
  
  <p>but when <code>firstname, lastname</code> is removed from <code>group by</code> it doesn't?</p>
  
  <blockquote>
    <p>ORA-00979: not a GROUP BY expression</p>
  </blockquote>