I have a table with userIDs, a table with testIDs, and a table that pairs userIDs with testIDs.  How could I, using only SQL, select each userID once based on the highest testID it corresponds with?
userIDTable: userID 1, userID 2, userID 3
mediatorTable: userID 1 testID 1, userID 2 testID 2, userID 1 testID 3, userID 2 testID 7, userID 3 testID 5
testIDTable: testID 1, testID 2, testID 3, testID 5, testID 7
SELECT userID 1 testID 3, userID 2 testID 7, userID 3 testID 5
 
    