select ma.PROJECT, ma.MITARBEITER, ma.PLANSTUNDEN, t.TASKID, t.TASKNAME, t.ESTEFFPH

  from (select distinct PROJECT FROM CCTASK) proj

  left outer join  (select DISTINCT TASKRESP as MITARBEITER, PROJECT, (SELECT SUM(ESTEFFPH) from CCTASK where PROJECT=t.PROJECT and TASKRESP=t.TASKRESP) as PLANSTUNDEN

      from CCTASK t

     where TASKRESP!='') ma on ma.PROJECT=proj.PROJECT 

    left outer join CCTASK t on t.TASKRESP=ma.MITARBEITER and t.PROJECT=ma.PROJECT

  where ma.PROJECT=?

  order by ma.PLANSTUNDEN desc, ma.MITARBEITER desc