title: SQL Group by error - "not a GROUP BY expression"
body: <p>I seem to be having a problem with my SQL query that's driving me mad. I just can't seem to get the group by to work. I keep getting the following error: </p>
  
  <pre><code>00979. 00000 -  "not a GROUP BY expression"
  </code></pre>
  
  <p><strong>My query:</strong></p>
  
  <pre><code>SELECT customers.customer_first_name, customers.customer_last_name, orders.customer_numb, books.author_name, books.title
  FROM customers
  LEFT OUTER JOIN orders ON (orders.customer_numb = customers.customer_numb)
  LEFT OUTER JOIN order_lines ON (order_lines.order_numb = orders.order_numb)
  LEFT OUTER JOIN books ON (books.isbn = order_lines.isbn)
  WHERE (customers.customer_numb = 6)
  GROUP BY (books.title)
  </code></pre>
  
  <p>Database schema:</p>
  
  <p><strong>Customers:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/h2qXq.png" alt="enter image description here"></p>
  
  <p><strong>Order Lines &amp; Orders:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/uAwu5.png" alt="enter image description here"></p>
  
  <p><strong>What I'm trying to achieve:</strong>
  I'm trying to group by book titles so that it doesn't show duplicate titles.</p>
  
  <p>I apologise if I've missed anything, thanks.</p>