I am using Firebird SQL. The below mentioned query returns 4 rows as shown in the figure.
SELECT a.EPS_ID,b.C_NAME,c.AY_YR_NAME,d.S_NAME,e.E_NAME FROM
Try
SELECT a.EPS_ID,c.AY_YR_NAME,d.S_NAME,e.E_NAME,MAX(b.C_NAME) AS XT ... GROUP BY 1,2,3,4