You could join the users
table with a query on feedback
, using a limit
clause to limit the nuber of rows:
SELECT f.userID, f.id, u.site
FROM feedback f
INNER JOIN (SELECT userID, site
FROM users
ORDER BY site DESC
LIMIT 1) u ON g.userID = u.userID
WHERE f.userID <> 'x'