Hi!
My dataset is about trust in government and media. It contains two variables:
1. city- the code of hometown of the subject
2. trust_media- average of trust on each city in media from 4 to 1
3. trust_gov- average of trust on each city in government from 4 to 1

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input int city float(trust_media trust_gov)
472     2.375 2.1666667
472     2.375 2.1666667
472     2.375 2.1666667
472     2.375 2.1666667
472     2.375 2.1666667
472     2.375 2.1666667
472     2.375 2.1666667
472     2.375 2.1666667
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
473  2.733333 2.1333334
475         2         1
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
478 2.7142856  2.142857
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
480       2.5       2.7
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
481      2.35     2.225
end
I want to export to excel the number of cities (unique values of cities) that I have their average of trust (non missing), in media and in government separately.

For example I'd like me excel file to look like this:
number of cities trust_media trust_gov
8 9
Thank you!