In below code how to select FundTransferDate with group year like year(FundTransferDate).
In mysql query it is working but how I can apply in cakephp query.
$this->paginate($this->Finances);
$data_array = $this->Finances->find();
$data_array = $data_array
->select([
'FundTransferDate',
'total_amount' => $data_array->func()->sum('CurrencyAmount')
])
->where([
'FundTransferStatus' => 'Succeeded',
'ProcessingStatus' => 'Closed'
])
->group(['year(Finances.FundTransferDate)'])->toArray();