Error: Could not execute query
select
(SELECT p.NOMBRE_PROV FROM PROVINCIA p WHERE p.id_prov=i.prov_ing) AS PROVINCIA,
(select count(*)
from calificacion_at c
where req_investigacion like 'SI'
AND TO_CHAR(c.fecha_cal, 'mm')=12 and TO_CHAR(c.fecha_cal, 'yyyy')=2024
AND c.prov_cal=i.prov_ing
group by c.prov_cal) SOLICITADOS,
count(*) INVESTIGADOS,
CASE WHEN count(*) >= (select count(*)
from calificacion_at c
where req_investigacion like 'SI'
AND TO_CHAR(c.fecha_cal, 'mm')=12 and TO_CHAR(c.fecha_cal, 'yyyy')=2024
AND c.prov_cal=i.prov_ing
group by c.prov_cal) THEN 'SI'
ELSE 'NO' END AS RESP
from investigacion_at i
where TO_CHAR(i.fecha_ing, 'mm')=12 and TO_CHAR(i.fecha_ing, 'yyyy')=2024
group by i.prov_ing
in db_query()