SQL - Find Results with MAXimum for given colum
I've used this data as start point:

create table t 
(
    target_link_id int,
    reversed_target_link boolean, 
    source_geometry_id  int, 
    reliability double precision
);

insert into t values
(750, true,    6156655, 96.90882243480968),
(750, true,    6156654, 96.3385845004076),
(759, false,   299963,  97.88820671302537),
(759, false,   299962,  90.81686447596023),
(759, false,   4339973, 83.83639328022115),
(981, true,    304625,  94.25089913251661),
(981, true,    304624,  96.521137788089),
(981, true,    304626,  94.21941014522639),
(981, true,    304621,  91.93785338486143),
(981, true,    304622,  95.27831743865612);


If you add a row_number() to your previous query you can get the desired result in this way:

with ct as
(
  select
      target_link_id,
      reversed_target_link,
      source_geometry_id,
      reliability,
      row_number() over (partition by target_link_id order by reliability desc) rn
  from
      t
)
select
    target_link_id,
    reversed_target_link,
    source_geometry_id,
    reliability,
from
    ct
where 
    rn = 1;




target_link_id | reversed_target_link | source_geometry_id | reliability      | rn
-------------: | :------------------- | -----------------: | :--------------- | -:
           750 | t                    |            6156655 | 96.9088224348097 |  1
           759 | f                    |             299963 | 97.8882067130254 |  1
           981 | t                    |             304624 | 96.521137788089  |  1



db&lt;>fiddle here