select a, count (b)
from table1 where b in ( select distict b from table2)
and table1.dated>=DATE('yy/mm/dd')
group by a;
In the above SQL, when I have count(b)>0 then it returns columns but when count=0 then no rows were returned
I did try UNION, NULLIF() and SELECT(SELECT()) as something but nothing worked.
I was expecting to get 0 returned if the count is equal to 0.