Mine
public text v1 · immutablechurn=# update test set rank = ( select count(*) from test x2 where x2.mark >= t
est.mark );
UPDATE 6
churn=# select * from test;
mark | rank
------+------
67 | 2
56 | 4
60 | 3
70 | 1
40 | 6
40 | 6
(6 rows)
here the rank shd be 5 for both 40 but it displays as 6.