Row_number over ()

can anyone help me?
SELECT *, ROW_NUMBER() OVER (ORDER BY Id DESC) AS rn FROM tbl_transaction_history WHERE Username = ? AND Acc_name = ? AND DateAndTime = ? AND Remarks = ? AND Type = ‘Bet’ AND Payment_method = ‘Ending’ AND Remarks IN (‘1st Quarter’,‘2nd Quarter’,‘3rd Quarter’,‘4th Quarter’,‘Over Time’) ORDER BY Id DESC

please convert to mongodb?

Hey @Rannie_Prince_Marayag,

Welcome to the MongoDB Community Forums! :leaves:

In order for us to better generate a query, could you please share below details:

  • MongoDB Version
  • Sample documents
  • Expected Output
  • Any queries that you have worked on?