id, имя1, имя2, значение
create view points_difference as
(
select first.names as name1, second.names as name2, first.points - second.points as points from user_points first
join user_points second
on first.id <> second.id
);