I am trying to left join two tables and as left join works - it should output all data from left and matched result from the right (even null values). But Dbeaver cuts all null values so that instead of having approximately 170 000 gross sales, I have only 130 000. Pls.help to fix query.
select
i.market_name,
i.date_key,
i.dil_channel,
sum(ceil(d.total_revenue)) as revenue_sum,
count(distinct(i.subs_key)) as gross_sales
from dwh.vw_fct_subs_inflow_aab as i
left join
dwh.vw_dm_subs_kpi_daily as d
on i.subs_key=d.subs_key and i.ban_key=d.ban_key
where d.subs_activation_date_key between '2020-07-01' and '2020-07-21'
and d.time_key between '2020-07-01' and '2020-07-21'
and i.date_key between '2020-07-01' and '2020-07-21'
and i.segment_key = 'NW1'
group by i.market_name,
i.date_key,
i.dil_channel