Select a.C1-b.C2 as Res from(Select Count(*) as C1 from UsersGroup by Name) ajoin(Select Count(*) as C2 from User2Group by Name) b ON 1=1 -- or desired condition if existing

Select a.C1-b.C2 as Res from(Select Count(*) as C1 from UsersGroup by Name) ajoin(Select Count(*) as C2 from User2Group by Name) b ON 1=1 -- or desired condition if existing