There are two ways to answer this question. We could use the summarize command with qualifiers to produce the answer, although this would take many lines of syntax and would take some time to work through. A quicker and more effective way to answer the question above is to use the sum option with the tabulate command.
tabulate province, sum(age)
| Summary of recoded age in years*
province | Mean Std. Dev. Freq.
------------+------------------------------------
CAPE | 26.275591 17.514877 635
NATAL | 27.556391 18.662611 266
TRANSVAA | 25.667313 18.129815 1031
ORANGE F | 23.78972 19.548608 214
KWA ZULU | 22.772537 18.121881 954
KANGWANE | 21.275591 17.296516 127
QWA-QWA | 26.130435 22.752231 23
GAZANKUL | 23.659794 20.673497 97
LEBOWA | 22.148454 18.730434 485
KWANDEBE | 27.235294 21.480771 51
TRANSKEI | 23.049153 19.617894 590
BOPHUTHA | 22.802005 17.235682 399
VENDA | 25.4 19.198818 75
CISKEI | 26.326241 19.882331 141
------------+------------------------------------
Total | 24.240763 18.527311 5088
We obtain the table above, which provides us with the mean age for each of the South African provinces.