"Ranking" values in an ORDER BY clause?
select 
rank() over (partition by jurisdiction_id order by year desc) AS rank,
*
from your_table
order by rank,total desc;


rank() over (...) is a window function, see: window functions in postgresql