title: PostgreSQL Grouping error
body: <p>I got this error when i was executing this query on PostgreSQL:</p>
  
  <pre>
  SQLSTATE[42803]: Grouping error: 7 ERROR:  column "posts.title" must appear in the GROUP BY clause or be used in an aggregate function
  LINE 1: SELECT DISTINCT posts.id, posts.* FROM "posts" GROUP BY "pos..
  </pre>
  
  <p>and this is my query:</p>
  
  <pre><code>SELECT DISTINCT posts.id, posts.* 
  FROM "posts" 
  GROUP BY "posts"."id" 
  ORDER BY "posts"."id" DESC 
  LIMIT 20 OFFSET 0
  </code></pre>
  
  <p>although it did worked when I was executing it with mysql, so how can i fix this?</p>