Skip to content

Instantly share code, notes, and snippets.

@gmyrianthous
Created September 4, 2022 13:28
Show Gist options
  • Save gmyrianthous/2ce5f901a9c189929dd4f594c67339a0 to your computer and use it in GitHub Desktop.
Save gmyrianthous/2ce5f901a9c189929dd4f594c67339a0 to your computer and use it in GitHub Desktop.
Select distinct customers and stores
SELECT DISTINCT customer_id, store_id
FROM rental_example;
/*
|customer_id|store_id|
|-----------|--------|
| 100 | 4 |
| 100 | 6 |
| 58 | 2 |
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment