SELECT user.login, user.name, point_user.pointsCount, point.pointKey
FROM user, point_user, point
WHERE user.userId = point_user.userId AND point_user.pointId = point.pointId ORDER BY user.login
SELECT
u.login,
u.name,
SUMM(pu.pointsCount) as pointsCount,
p.pointKey
FROM
user u,
point_user pu,
point p
WHERE
u.userId = pu.userId AND
pu.pointId = p.pointId
ORDER BY u.login
GROUP BY
u.login,
p.pointKey
SELECT user.login, user.name, sum(point_user.pointsCount) pointsCount, point.pointKey
FROM user, point_user, point
WHERE user.userId = point_user.userId
AND point_user.pointId = point.pointId
GROUP BY user.login, user.name, point.pointKey
ORDER BY user.login