I have problem that with my command because it still return me null rows with value but i dont know why.
If i use this:
SELECT count(ad.idfirmy) as id
FROM aadresar as ad
WHERE ad.idfirmy IN (SELECT DISTINCT f.idfirmy FROM ddoklfak f WHERE f.modul = 'FAV' and f.datvyst >= '2019-01-01' and f.datvyst <= '2019-06-30')
It´s return me result count 6652
And this command result me 49463.
SELECT count(ad.idfirmy) as id
FROM aadresar as ad
But this result me 0 rows but i dont know why, because its important for me, what is not in function "NOT IN"
SELECT ad.idfirmy as id
FROM aadresar as ad
WHERE ad.idfirmy NOT IN (SELECT DISTINCT f.idfirmy FROM ddoklfak f WHERE f.modul = 'FAV' and f.datvyst >= '2019-01-01' and f.datvyst <= '2019-06-30')
and result is 0 so why? Please help.