I have a SQLAlchemy query with a row_number function like this which works fine: func.row_number().over(order_by=a.desc()) What I'd like to do is add a second sort to help with "tie breaking". I've tried: func.row_number().over(order_by=a.desc(),b.desc()) Which I didn't really expect to work. I've also tried: func.row_number().over(order_by=(a.desc(),b.desc())) and func.row_number().over(order_by=[a.desc(),b.desc()]) Those didn't work either. I haven't found a syntax example online, hence my question - How do you do multiple sorts in a window function using sqlalchemy? Continue reading...