select count(id), "medicine_type" from chemist_medicines where chemist_id = 682 group by 2;--3 counts
select count(id), "mapped_status" from chemist_medicines where chemist_id = 682 and "medicine_type" = 'drug' group by 2 order by mapped_status; -- 2 counts
select count(id) as seperated_by_previous_data from chemist_medicines where chemist_id = 682 and "medicine_type" = 'otc' and mapping_table_id != 'chemist_mediicens-0';-- 1 counts
select count(id) as seperated_by_tokens from chemist_medicines where chemist_id = 682 and "medicine_type" = 'otc' and mapping_table_id = 'chemist_mediicens-0'; -- 1 counts
After Medicine Mapping process completed - 7
select count(id) from chemist_medicines cm where mapped_status = 0 and medcine_type = ‘drug’ and chemist_id = 682; -- 1 counts total mapping process
SELECT elastic_algo_step, count(id) from medicine_matching mm where chemist_id = 682 group by 1;-- 5 counts Stepwise count
select count(id) from chemist_medicines cm where mapped_status = 0 and medcine_type = ‘otc’ and chemist_id = 682; -- 1 counts total inserted as OTC with 401