Created
December 7, 2017 21:14
-
-
Save bishwahang/636c57b6d5076629cba09eb64f5e1269 to your computer and use it in GitHub Desktop.
user row_number window function in postgres
This file contains hidden or 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
| freeletics_api_dev=# select row_nr, first_name, fl_uid from (select row_number() over (order by fl_uid asc) as row_nr, fl_uid, first_name from users) sub | |
| where sub.first_name = 'nocoach'; | |
| row_nr | first_name | fl_uid | |
| --------+------------+-------- | |
| 2 | nocoach | 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment