SELECT TB_TEST.test_id, TB_TEST.test_name, TB_TEST.test_explanation, COUNT(TB_ITEM.item_id) AS Expr1
FROM TB_TEST LEFT OUTER JOIN
TB_ITEM ON TB_TEST.test_id = TB_ITEM.test_id
GROUP BY TB_TEST.test_id, TB_TEST.test_name, TB_TEST.test_explanation
HAVING TB_TEST.test_id = 2 AND TB_TEST.test_name LIKE'%te%'