Postgresql – Is there a way to prevent ROW_NUMBER's ORDER BY from having to repeat the same thing?
I currently have this SQL: select ROW_NUMBER()OVER(order by priority DESC NULLS LAST , created_at DESC) as index , id , title , ago(created_at) , priority , user_id from post order by priority DESC NULLS LAST , created_at DESC; As you…