ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead.
CONTEXT: PL/pgSQL function inline_code_block line 11 at SQL statement
DO $$
DECLARE
id_renovacion integer := (select Id_renovacionContrato
from BEA.DIM_RENOVACION_CONTRATO where upper(Desc_renovacionContrato) = 'UNDEFINED');
id_renovacionpending integer := (select Id_renovacionContrato
from BEA.DIM_RENOVACION_CONTRATO where upper(Desc_renovacionContrato) = 'PENDING');
BEGIN
SELECT count(id_contrato) as id_cantidad,
CASE when count(id_contrato) = 0 THEN 'ImagesHappyMaritransparente1.png'
when count(id_contrato) is null THEN 'ImagesHappyMaritransparente1.png'
when count(id_contrato) = 1 THEN 'ImagesTITIhappymarycontratos-off-1_145.png'
when count(id_contrato) = 2 THEN 'ImagesTITIhappymarycontratos-off-2_145.png'
when count(id_contrato) = 3 THEN 'ImagesTITIhappymarycontratos-off-3_145.png'
when count(id_contrato) = 4 THEN 'ImagesTITIhappymarycontratos-off-4_145.png'
when count(id_contrato) = 5 THEN 'ImagesTITIhappymarycontratos-off-5_145.png'
when count(id_contrato) = 6 THEN 'ImagesTITIhappymarycontratos-off-6_145.png'
when count(id_contrato) = 7 THEN 'ImagesTITIhappymarycontratos-off-7_145.png'
when count(id_contrato) = 8 THEN 'ImagesTITIhappymarycontratos-off-8_145.png'
when count(id_contrato) = 9 THEN 'ImagesTITIhappymarycontratos-off-9_145.png'
when count(id_contrato) > 9 THEN 'ImagesTITIhappymarycontratos-off-9+_145.png'
END
FROM BEA.FACT_CONTRATOS
WHERE cantDiasDif > 0 AND Id_rangoContrato IN (id_renovacion, id_renovacionpending);
END
$$
LANGUAGE plpgsql; ```
ERROR: query has no destination for result data" ?