title: "sql_mode=only_full_group_by" incompatibility error
body: <p>My SQL statement worked fine in another local server, but after trying out my project in recently installed lamp server it is showing the following error-</p>
  
  <blockquote>
    <p>Expression #2 of SELECT list is not in GROUP BY clause and contains
    nonaggregated column 'newmesssages.send_date' which is not
    functionally dependent on columns in GROUP BY clause; this is
    incompatible with sql_mode=only_full_group_by</p>
  </blockquote>
  
  <p>The statement-</p>
  
  <pre><code>SELECT COUNT(reciever) as total, send_date, message, sender_username, sender_name 
  FROM (SELECT * FROM messages_view WHERE reciever = 17 AND viewed_by_reciever is NULL order by send_date DESC) 
  AS newmesssages 
  GROUP BY sender ORDER BY send_date DESC LIMIT 20
  </code></pre>