Problem with Group by

I have a problem realizing one special kind of query:

I have two Models:
Jobs and JobStatus

Every Job has multiple JobStatus.
Every JobStatus has a name and a date.

I now need in my Job Model a field with the name of the JobStatus with the highest date.

Is that easily possible in ATK4?

I have the query written in SQL:
SELECT Name FROM (SELECT JID, MAX(date) AS created_at FROM JobStatus where JID='00b3f29e-8038-432e-ae58-30b755a58482' GROUP BY JID ) AS latest_orders INNER JOIN JobStatus ON JobStatus.JID = latest_orders.JID AND = latest_orders.created_at


This can be done with the ATK4 reporting extension:

@HPL - You can create any type of sub-select through Expression functionality:

   ->setOrder('date', 'desc')

Also this might be relevant: