title: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'jquzntys.posts.id'
body: <p>I'm trying to count posts by their statuses. But below query give me this error.</p>
  
  <blockquote>
    <p>Error Message: [42000][1140] In aggregated query without GROUP BY,
    expression #1 of SELECT list contains nonaggregated column
    'jquzntys.posts.id'; this is incompatible with
    sql_mode=only_full_group_by</p>
  </blockquote>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT COUNT(p.id)  total,
         p1.authors   authors,
         p2.published published,
         p3.pending   pending,
         p4.scheduled scheduled,
         p5.draft     draft,
         p6.deleted   deleted
  FROM posts p
           LEFT JOIN (
      SELECT id, COUNT(*) as `authors`
      FROM posts
      WHERE user_id = ?
  ) AS p1 ON p1.id = p.id
           LEFT JOIN (
      SELECT id, COUNT(*) as `published`
      FROM posts
      WHERE status = ?
  ) AS p2 ON p2.id = p.id
           LEFT JOIN (
      SELECT id, COUNT(*) as `pending`
      FROM posts
      WHERE status = ?
  ) AS p3 ON p3.id = p.id
           LEFT JOIN (
      SELECT id, COUNT(*) as `scheduled`
      FROM posts
      WHERE status = ?
  ) AS p4 ON p4.id = p.id
           LEFT JOIN (
      SELECT id, COUNT(*) as `draft`
      FROM posts
      WHERE status = ?
  ) AS p5 ON p5.id = p.id
           LEFT JOIN (
      SELECT id, COUNT(*) as `deleted`
      FROM posts
      WHERE status = ?
  ) AS p6 ON p6.id = p.id
  </code></pre>
  
  <p>There is no such of data that need to be under group. Why I'm getting this error ?</p>