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