title: GROUP BY Function Issue
body: <p>I have the below example:</p>
  
  <pre><code>SELECT name, age, location, SUM(pay)
  FROM employee
  GROUP BY location
  </code></pre>
  
  <p>This as expected will give me an error:</p>
  
  <pre><code>ORA-00979: not a GROUP BY expression
  </code></pre>
  
  <p>How can I get around this? I need to group by one maybe two columns but need to return all columns even if they're not used in the GROUP BY clause, I've looked at sub-queries to get around it but have had no luck so far.</p>