Created
July 4, 2016 07:45
-
-
Save dfbag7/349e7144bdcfa327dfdb00c68247c5c8 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