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