How to create table from two alias tables with sql

I want to create a table that shows a name, position week1, position week2. I created the following queries that give the correct result for each week separately. All the data is in one table results. Server version: 10.4.14-MariaDB

 SELECT     name, team, points,week,      @curRank := @curRank + 1 AS position     FROM results,  (SELECT @curRank := 0) r     WHERE week = 1     order by points DESC 

and

SELECT     name, team, points,week,      @prevRank := @prevRank + 1 AS position2     FROM results,  (SELECT @prevRank := 0) r2     WHERE week = 2 ORDER BY points DESC 

But when I combine the with UNION I get an incorrect result.

(SELECT     name, team, points,week,      @curRank := @curRank + 1 AS position     FROM results,  (SELECT @curRank := 0) r     WHERE week = 1)       UNION  (SELECT     name, team, points,week,      @secondRank := @secondRank + 1 AS position2     FROM results,  (SELECT @secondRank := 0) r2     WHERE week = 2) ORDER BY points 

So how would I combine the two select statements to get the table with just name, position week1, position week2? I do not need points in the table, but points are used to calculate the position.