select
    cona11.nr01 as nr01,
    cona11.p08 as p08,
    cona11.p00 as p00,
    cona11.p04 as p04,
    cona11.p05 as p05,
    cona01.p01 as vp01,
    cona07.p02 as vp06,
    cona12.p01 as cp01,
    cona12.p02 as cp02

FROM cona12
LEFT JOIN cona11 ON cona11.nr01=cona12.p00
LEFT JOIN cona01 ON cona01.nr01=cona11.p01
LEFT JOIN cona07 ON cona07.p01=cona11.p06
WHERE cona07.p03='1'
  &&  cona11.p04<='{dtos(np03)}'
  &&  cona11.p05>='{dtos(np03)}'
  &&  cona12.p02='{np304}'
  &&  cona12.p01='{np3041}';
