ER_WRONG_FIELD_WITH_GROUP: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated
<p>I am trying to run this query but it throws an error</p>

<p>ER_WRONG_FIELD_WITH_GROUP: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated</p>

<p>Below is the query which I am using in my code.</p>

<pre><code>"select created_at from user where username = '" + id + "' group by DATE(created_at)"
</code></pre>