this is the query
SELECT NAME,DATE, COUNT(*) AS ROW_COUNT
FROM STG
WHERE
DATE='2018-04-23' AND
NAME='DRAFT'
GROUP BY NAME,DATE
Requirement is if the query returns no rows then I should get output as 'TEST','TODAY'S DATE', 0 else if query return rows then the normal output which is expected.