Query 1:
SELECT COUNT (A.EMPNO) AS [PRESENT] FROM ERPDATA.NIITESS.DBO.ZEMP_MASXST_WEB_AL A INNER JOIN PPA_EVENTWISEEMPLOYEEMASTER B O
Select a.C1-b.C2 as Res from ( Select Count(*) as C1 from Users Group by Name ) a join ( Select Count(*) as C2 from User2 Group by Name ) b ON 1=1 -- or desired condition if existing