title: groupby week of date column in sql
body: <p>i am not understand group by clause in laravel
  Query: </p>
  
  <pre><code> DB::table('ipaddress')-&gt;select('date', DB::raw('count(id) as total'))
                         -&gt;where('date','&gt;=','now()-interval 6 week')
                         -&gt;groupBy(DB::raw("WEEK(`date`)"))
                         -&gt;get();
  </code></pre>
  
  <blockquote>
    <p>Error: SQLSTATE[42000]: Syntax error or access violation: 1055 'kitchen_portal.ipaddress.date' isn't in GROUP BY (SQL: select <code>date</code>, count(id) as total from <code>ipaddress</code> where <code>date</code> >= now()-interval 6 week group by WEEK(<code>date</code>))</p>
  </blockquote>