Is there a way to calculate the area size of multiple polygons having the same value (in this case building number) like group stats in QGIS?
The way to do this in GRASS uses a reclass of the vector layer, then when you update the database of this reclass vector with i.e. area, the total of the reclassed features will be calculated. See: v.reclass man page
If you have a
buildings polygon with a integer or text field
v.reclass input=buildings output=buildings_by_num column=building_num v.db.addtable map=buildings_by_num column="ttl_area DOUBLE" v.to.db buildings_by_num option=area unit=meters column=ttl_area v.db.select buildings_by_num # should show one total value for each building num