Para obtener el último registro por cliente entre cada ciudad según created_at
puedes usar una autounión
DB::table('yourTable as t')
->select('t.*')
->leftJoin('yourTable as t1', function ($join) {
$join->on('t.Customer','=','t1.Customer')
->where('t.City', '=', 't1.City')
->whereRaw(DB::raw('t.created_at < t1.created_at'));
})
->whereNull('t1.id')
->get();
En SQL simple sería algo como
select t.*
from yourTable t
left join yourTable t1
on t.Customer = t1.Customer
and t.City = t1.City
and t.created_at < t1.created_at
where t1.id is null
Otro enfoque con self internal join sería
select t.*
from yourTable t
join (
select Customer,City,max(ID) ID
from yourTable
group by Customer,City
) t1
on t.Customer = t1.Customer
and t.City = t1.City
and t.ID = t1.ID