I have time in SAS Enterprise Guide like below:
| COL1 | COL2 | COL3 |
|---|---|---|
| 10 | 12 | 44 |
| 15 | 8 | 2 |
| 10 | 12 | 44 |
And I need to select duplicated rows --> select duplicate rows, but only those where duplicates occur in each column
| COL1 | COL2 | COL3 |
|---|---|---|
| 10 | 12 | 44 |
| 10 | 12 | 44 |
How can I do that in SAS Enterprise Guide / PROC SQL ?
If you want to eliminate the observations that occur only once then you could do something like:
The unique rows are the only rows in their by grouping, so they are both the first row and the last row.
Here is a trick to use if there are a lot of variables and you are not sure which one will end up last if you use the _all_ variable list. Just add any one to the end and use that.