I have a data like below. I need to get the distinct Col 1 values where it has both "aaa" and "bbb" as Col 2 values.
Sorry, just starting to learn SQL on my own.
my table
|--------|----------|
| Col 1 | Col 2 |
|--------------------
| 1 | aaa |
| 1 | bbb |
| 2 | aaa |
| 2 | ccc |
| 3 | aaa |
| 3 | bbb |
| 3 | ccc |
|--------|----------|
Result should be below.
|--------|
| Col 1 |
|--------|
| 1 |
| 3 |
|--------|
Thank you.