I am new to informatica development I want to create mapping where I need to check if any duplicates. I have below sql query from which I have to create the mapping.
Select count(1), A.market_cd from (select distinct account_no, market_cd from Db1.Table1 where $$monthenddate between date(eff_begin) and date(eff_end) group by account_no, market_cd having count(1) > 1 ) A group by market_cd ;
Select count(1), A.market_cd from (select distinct account_no, market_cd from Db2.Table2 where $$monthenddate between date(eff_begin) and date(eff_end) group by account_no, market_cd having count(1) > 1 ) A group by market_cd ;
Select count(1), A.market_cd from (select distinct account_no, market_cd from Db3.Table3 where $$monthenddate between date(eff_begin) and date(eff_end) group by account_no, market_cd having count(1) > 1 ) A group by market_cd
Result:-
Count | Market_cd
0
Ideal result for the above queries should be zero rows. I have to check if the result gives any count or not.
I have to Union all the above queries in target flat file. What logic and transformation can be used to create the mapping? Please can someone help