these are the two queries, returning multiple records, so is there any solution to subtract each row data of one result from another result?
query1:
SELECT COUNT(*) As AbhidayNotPaidSansthan
FROM PanjikaranMaster GROUP BY Zila
query2:
SELECT COUNT(*) as anps FROM AbhidayMaster,PanjikaranMaster
WHERE PanjikaranMaster.OfficeRegId=AbhidayMaster.OfficeRegId AND
AbhidayMaster.DipositDate Between ('2012-09-19') AND ('2012-09-24')
GROUP BY PanjikaranMaster.Zila
Try with this query, it will solve your problem:
I have done similar test in SQLFIDDLE