Nested Query in ES

I have an index with below fields
SimID - Guid,
UserId - Guid,
WhenUserTrained - Datetime,
WhenUserClicked - Datetime.

Now I want to get the user count for given simulation who trained in past under any simulaton.
In sql I would write something like this
Select count(*) form Sim where SimId =='abc' and UserId in (select userid from sim where whenusertrained > today)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.