Ar One-To-Many Order By


i describe what i have and what want to receive here (cant paste link so paste all text):

i need this for my order/index.

now i receive this data via such SQL:

SELECT,, oh_status.update_time


  tbl_order o



    SELECT order_id,update_time  FROM tbl_order_status WHERE (order_id,update_time) IN

    (SELECT order_id, MAX(update_time) max_update_time FROM tbl_order_status GROUP BY order_id)

  ) oh_status

  ON ( = oh_status.order_id)

order by oh_status.update_time desc

i want to know how make this via AR ?

i start learn yii and start work with AR and it is looks very nice when work with one table, but complicated when try to work with two or more tables.

i learn yii2 AR, but think nobody now can answer about yii2 AR, so ask here and if receive answer will try find equivalent in yii2. ty.