Get id from agg_type