PHP Code:
$top = $DB_site->query_first('
SELECT user.userid, username, field10
FROM user
LEFT JOIN userfield USING (userid)
ORDER BY field10 DESC
');
Then use $top[userid] for user ID, $top[username] for username, and $top[field10] for the value of field 10.
(Just so you know, the original code had LIMIT 5 but I removed that since we are using query_first() anyway. If you want to get the top 5, you'll need some different code. But the code above does exactly the same thing your original code did.)