G
G
guerrrka2021-02-20 01:41:37
Node.js
guerrrka, 2021-02-20 01:41:37

How to get the last 10 records in Sequelize and sort them in reverse order?

Hello. Previously, the SQL query looked like this: SELECT * FROM(SELECT * FROM users WHERE ... ORDER BY rowid DESC LIMIT 10) ORDER BY id ASC; How to implement the same request using Sequelize?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question