By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| Col1 | rn | Col2 |
|---|---|---|
| 20 | 1 | Matched |
| 20 | 2 | NotMatched |
| 20 | 3 | NotMatched |
| 30 | 1 | NotMatched |
| 40 | 1 | Matched |
| 50 | 1 | NotMatched |
| 60 | 1 | Matched |
| Col1 | rn | Col2 |
|---|---|---|
| 20 | 1 | Matched |
| 20 | 2 | NotMatched |
| 20 | 3 | NotMatched |
| 30 | 1 | NotMatched |
| 40 | 1 | Matched |
| 50 | 1 | NotMatched |
| 60 | 1 | Matched |