title: how to fix with created_at?
body: <p>error:</p>
  
  <pre><code>SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous (SQL: select `title`, sum(city_population) as sum from `provinces` inner join `ground_province` on `provinces`.`id` = `ground_province`.`province_id` inner join `grounds` on `grounds`.`id` = `ground_province`.`ground_id` where year(`created_at`) = 2019 group by `title`)
  </code></pre>
  
  <p>Code:how to fix this code with create_at ? There is someone to help me</p>
  
  <pre><code> $current_year = Carbon::today();
      $year = $current_year-&gt;year;
      $grounds=DB::table('provinces')
  
  -&gt;join('ground_province','provinces.id','ground_province.province_id')
          -&gt;join('grounds','grounds.id','ground_province.ground_id')
          -&gt;select('title',\DB::raw('sum(city_population) as sum'))-&gt;whereYear('created_at', $year)
          -&gt;groupby('title')-&gt;get();
  
      $title=[];
      $ground=[];
      foreach ($grounds as $key =&gt; $value) {
          $title[$key]=$value-&gt;title;
          $ground[$key]=$value-&gt;sum;
      }
  </code></pre>