-
-
Save zaidysf/98fb9664c869f811bea2b40be8ff0bac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update workgroups | |
set name = workgroups.name || ' (' || d.rnk::text || ')' | |
from (select id, row_number() over (partition by name order by updater_txn_id, id) as rnk from workgroups) d | |
where workgroups.id = d.id and d.rnk > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment