I have to do counts to the quantity of entitys in the database i have to obtain the quantity of registries for entities that appear
ENTITY OVERALL DATE HOUR
====== ===== ==== ====
ENT1 5 20100318 12:00
ENT2 20 20100318 12:00
ENT3 12 20100318 12:00
CURSOR1
SELECT distinct(rp.cod_entidad),
YYYYYYYYY,
to_date(to_char(SYSDATE,'YYYYMMDD'),'YYYY-MM-DD') as fecha_pago,
to_char(sysdate,'hh-mi-ss') as hora_pago
FROM registry rp, product pc
where pc.nro_solicitud = rp.nro_solicitud
and pc.resp_2= 'OK'
and pc.resp_1= 'OK'