Postgres получают последнее значение
select last_value("name") over(order by created_at desc) as name from profile
Restu Wahyu Saputra
select last_value("name") over(order by created_at desc) as name from profile