database query with filter on field in an object

Options

Hi !
Let's imagine a user database. This database has a list field of objects called "states". Each object has a state (int) and date (timestamp) field.
This represents the user's status history.

Is it possible to make a query that will directly filter users with a specific status on the most recent date?

At the moment, I'm forced either to use a forEach loop, or to use a higher order filter, which isn't ideal in terms of performance.

I've tried to make a join, but without success.

Tagged:

Answers

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    I would make an additional field, "currentstate, " just the int. That way you can easily filter for it without having to be indirect.