jeudi 29 juillet 2021

SQL Server: Select random records with no duplicates

For an auditing project, need to select at random three tracking IDs per associate and cannot be dups. Wondering if it's possible with SQL?

Sample SQL Server Data:

Associate Tracking ID
Smith, Mary TRK65152
Smith, Mary TRK74183
Smith, Mary TRK35154
Smith, Mary TRK23117
Smith, Mary TRK11889
Jones, Walter TRK17364
Jones, Walter TRK91736
Jones, Walter TRK88234
Jones, Walter TRK80012
Jones, Walter TRK55874
Williams, Tony TRK58142
Williams, Tony TRK47336
Williams, Tony TRK13254
Williams, Tony TRK28596
Williams, Tony TRK33371

Regards, Manny




Aucun commentaire:

Enregistrer un commentaire