select ilv.JAHR, 'Summe' as MONAT, 'Summe' as TAG, ilv.PSP, (select TITEL from CCILPSP psp where psp.PSP=ilv.PSP) as PSP_TITEL, ilv.USKURZZ, SUM(ilv.STUNDEN) as STUNDEN, SUM(ilv.KOSTEN) as KOSTEN

   from CCILVD  ilv

  where PSP like CONCAT((select PSPcode from CCTASK where TASKTYPE='JAP' and PROJECT=?),'%') 

               and USKURZZ=? and JAHR=?

  group by JAHR, PSP

UNION

select JAHR,MONAT,'Summe' as TAG, 'Summe' as PSP, 'Summe' as PSP_TITEL, USKURZZ,

           SUM(STUNDEN) as STUNDEN, SUM(KOSTEN) as KOSTEN

  from  CCILVD 

  where  PSP like CONCAT((select PSPcode from CCTASK where TASKTYPE='JAP' and PROJECT=?),'%') 

                and USKURZZ=? and JAHR=?

 group by JAHR,MONAT,USKURZZ

UNION

select JAHR, 'Summe' as MONAT, 'Summe' as TAG, 'Summe' as PSP, 'Summe' as PSP_TITEL, USKURZZ,

           SUM(STUNDEN) as STUNDEN, SUM(KOSTEN) as KOSTEN

  from CCILVD

 where PSP like CONCAT((select PSPcode from CCTASK where TASKTYPE='JAP' and PROJECT=?),'%') 

                and USKURZZ=? and JAHR=?

  group by JAHR,USKURZZ