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