Let\'s say I have a User model with fields popularity and date_created. I want to do the following query:
User
popularity
date_created
SELECT * FROM us
This should work
User.query.order_by(User.popularity.desc(),User.date_created.desc()).limit(10).all()