select distinct cedpar,nompar,apepar,razsoc from gevtparticipantes,gevmdeventosparticipantes,gevtcpatrocinantes where (gevtparticipantes.codpar=gevmdeventosparticipantes.codpar) and (gevmdeventosparticipantes.codpat=gevtcpatrocinantes.codpat) and (codeve='@1') and (codhot='@2') and ((((gevmdeventosparticipantes.tippre='S') or (gevmdeventosparticipantes.tippre='P')) and (stapatinc='S')) or ((tippre='N'))) order by razsoc,cedpar