Update test case with subquery case