I'm try to get exact solution as following as:
SELECT two.stname,
SUM(smark*(1-ABS(SIGN(sname)))) AS en,
SUM(smark*(1-ABS(SIGN(sname)))) AS mat,
SUM(smark*(1-ABS(SIGN(sname)))) AS phy
FROM a1 AS ONE
LEFT JOIN a2 AS two
ON one.sid=two.stid
GROUP BY sname;