How would I go about adding the PERSIST function to a ranking?
I plan on creating a view from this code and will be frequently running subqueries on it. So of course I don't want the ranking number to change based off of whatever subquery I run. I want it to be a normal, non-formula-like column.
SELECT a.player_id, a.full_name, a.first_name, a.last_name, d.[rank],
d.column3, a.tournament, c.column5, a.[year], a.[round],
a.score, RANK() OVER (PARTITION BY a.[round] + b.tournament_id + a.
[year] ORDER BY a.score) AS round_leaderboard
FROM df1 AS a JOIN
df2 AS b ON a.tournament = b.tournament JOIN
df3 AS c ON c.[Event] = a.tournament
LEFT JOIN df4 as d
On a.player_id=d.player_id and a.[year]=d.[year]