Ok, I've been thinking about this one for a while, but couldn't come up with anything good.
I have a table that has 2 fields (for simplicity sake) 'user' and 'session'. Neither of these fields is the primary key, both have duplicates. Two different users cannot have the same session id, but the same user can have multiple instances with the same session id. The goal is to find all groups of (user, session) where session is unique. In other words, in a table:
Richard 1022
Richard 1022
Sam 1033
Richard 1022
Karen 1120
Karen 1122
Karen 1120
The result should be:
Richard 1022
Sam 1033
Karen 1120
Karen 1122
I have a table that has 2 fields (for simplicity sake) 'user' and 'session'. Neither of these fields is the primary key, both have duplicates. Two different users cannot have the same session id, but the same user can have multiple instances with the same session id. The goal is to find all groups of (user, session) where session is unique. In other words, in a table:
Richard 1022
Richard 1022
Sam 1033
Richard 1022
Karen 1120
Karen 1122
Karen 1120
The result should be:
Richard 1022
Sam 1033
Karen 1120
Karen 1122
