Hay un error: ERROR: column "fallece" does not exist LINE 25: WHERE n.idnota =fallece ^