Created
September 4, 2022 14:04
-
-
Save gmyrianthous/292c3a69a938f8e76d9158422349ed4b to your computer and use it in GitHub Desktop.
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
SELECT DISTINCT ON (customer_id) customer_id, store_id | |
FROM rental_example | |
ORDER BY customer_id, amount; | |
/* | |
|customer_id|store_id| | |
|-----------|--------| | |
| 58 | 2 | | |
| 100 | 6 | | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment