I want to make the following select on Oracle PL/SQL:
I have two columns ServedIMSI, Servicekey. There are many servicekey dublicates, so I want to select only the unique ones and one random record for ServedIMSI that matches on the number of the servicekey . Is there a way to do that ?
Aggregation per SERVEDIMSI column (such as MAX or MIN) will return just one SERVEDIMSI for distinct SERVICEKEY values. As you said that "random" is OK, it doesn't matter whether it is MAX or MIN (or any other you find useful).
select servicekey, max(servedimsi)
group by servicekey