You should have a master NCS table in which all administrative units from top to lower level with respective codes, parents admin names and parent codes in separate columns. By linking your data with this master table you can aggregate your data at any level above.