119
p.datebegin,
p.dateend,
p.dateout,
p.sumacc,
c.familyname || ' ' || c.firstname || ' ' ||
c.secondname as fio,
'СЕРИЯ ' || c.passserial || ' № ' || c.passno ||
', ВЫДАН ' || c.whengive || ' ГОДА, ' || c.whogive as pass,
c.address,
c.idclient
from owners o, polises p, serials s, tarifs t, clients c
where p.idserial = s.idserial
and p.idtarif = t.idtarif
and p.idowner = o.idowner
and p.idclient = c.idclient
and p.idpolis = :idp) i,
clients c
where c.idclientchild = i.idclient) o
group by o.owner,
o.serial,
o.polisno,
o.polisdate,
o.polissubject,
o.suminsured,
o.cash,
o.datebegin,
o.dateend,
o.dateout,
o.sumacc,
o.fio,
o.pass,
o.address