如何使用Idiorm查询重写此内容?
SELECT *
FROM regioner_financier_correspond as t1
INNER JOIN (SELECT MAX(t2.id) as maxId
FROM regioner_financier_correspond as t2
WHERE `client_code` IN ('03-01', '03-07', '03-08', '03-67')
GROUP BY t2.client_code) as t3
ON t1.id=t3.maxId
附加: 我试试这个,但它不起作用
$data = \ORM::for_table('regioner_financier_correspond')
->select('regioner_financier_correspond.*', 't1')
->inner_join('regioner_financier_correspond', array('t1.id', '=', 't3.maxId'), 't2')
->where_in('client_code', explode(',', $clients))
->group_by('t3.client_code')
->find_many();