SELECT t1.id,t1.name,t1.type AS type1,t2.type AS type2,t3.type AS type3 FROM table1 t1 LEFT JOIN table1 t2 ON t1.id=t2.id LEFT JOIN table1 t3 ON t1.id=t2.id
UNION
SELECT t1.id,t1.name,t1.type AS type1,t2.type AS type2,t3.type AS type3 FROM table1 t3 LEFT JOIN table1 t1 ON t1.id=t2.id LEFT JOIN table1 t2 ON t1.id=t2.id
UNION
SELECT t1.id,t1.name,t1.type AS type1,t2.type AS type2,t3.type AS type3 FROM table1 t2 LEFT JOIN table1 t3 ON t1.id=t2.id LEFT JOIN table1 t1 ON t1.id=t2.id
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