Hi everyone, I am fairly new to OrientDB and trying to wrap my head around some concepts. Currently I am trying to load the all the newest two conversations a user had with other users.
In SQL I would do something like:
SELECT message_text, sender_id, receiver_id FROM ( SELECT row_number() over( PARTITION BY sender_id, receiver_id ORDER BY message_created_at DESC), message_text, sender_id, receiver_id ) WHERE row_number < 3
How to achieve it with Orient, I can’t seem to find a numbering function