What you are after is ranking within a category, where each name is the "category" and the points will be ranked for each name.
I found a neat trick on this
post[
^] which I used in this query
SET @prev := null;
SET @cnt := 0;
CREATE TEMPORARY TABLE IF NOT EXISTS table2 AS
(
SELECT U.user_id, user_name, points,
IF(@prev <> U.user_id, @cnt := 1, @cnt := @cnt + 1) AS rank,
@prev := U.user_id
FROM user U
JOIN point P ON U.user_id = P.user_id
ORDER BY U.user_id, points DESC;
);
select user_id, user_name, points from table2 where rank < 4;
Sorry - sqlfiddle crashed on me so I haven't been able to test it fully.
Points to note - I've ordered the query by user_id ascending but points Descending as the points values seemed to increase. I haven't tried the query without the order on points. If there was a date/time when the points were gained then you could use that to get "the last 3 points" otherwise you might want to have a play around with
emulating the sql Row_number function[
^]