$q->select('id')->from('qualified_determinant')->where($q->expr->in('id', $sq));
$sq->select('determinant_profile_id')->from('q_det_ci')
->where($sq->expr->eq('car_id',$sq->bindValue($carindex)));
becomes:
SELECT id FROM qualified_determinant
WHERE id IN ( ( SELECT determinant_profile_id FROM q_det_ci WHERE car_id = :ezcValue1 ) )
AND ( extra_id IN ( '413', '488', '506', '507', '698', '699', '700' ) OR extra_code IN ( 'DCP' ) )
This does work fine for the SQLite handler though.