Calculate first value based on condition – Postgresql
I have the following table ticks datetime lowest_tick tick_lower 2022-10-01 00:02:00 204406 204306 2022-10-01 00:03:00 204525 204425 2022-10-01 00:04:00 204414 204314 2022-10-01 00:05:00 204200 204100 2022-10-01 00:06:00 204220 204120 2022-10-01 00:07:00 204120 204020 What I want to get is to…