query for attribute id