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