Hello everyone,

I am currently working on cleaning the data that I will be using for my master's thesis. The data shows FDI inflows per year (1999-2020) per state in Mexico and also its country of origin. Below is an example of how the data looks like when the country of origin of the FDI is Germany. I am not interested in the country of origin variable and thus I would like to sum all of the observations which have the same value for Year and for State. I am relatively new to STATA and I am unsure of how to do this, I would thus be very grateful if someone could help me with it. Thank you in advance for your help.

Aguascalientes Alemania 1999 22.199.750.000.000.000
Aguascalientes Alemania 2000 1.840.311
Aguascalientes Alemania 2001 20.079.869.999.999.900
Aguascalientes Alemania 2002 7.237.639.999.999.990
Aguascalientes Alemania 2003 78.999.779.999.999.900
Aguascalientes Alemania 2004 2.110.816
... ... ... ...
Baja California Alemania 1999 25.095.676.010.000.000
Baja California Alemania 2000 5.905.024.999.999.990
Baja California Alemania 2001 4.838.782.699.999.990
Baja California Alemania 2002 5.243.187.999.999.990
Baja California Alemania 2003 -22.562.400.000.000.000
Baja California Alemania 2004 11.648.475.000.000.000
... ... ... ...
Baja California Sur Alemania 1999 71.448
Baja California Sur Alemania 2000 27.569.008.999.999.900
Baja California Sur Alemania 2001 52.277.437
Baja California Sur Alemania 2002 17.673
Baja California Sur Alemania 2003 0
Baja California Sur Alemania 2004 131.249
... ... ... ...
Campeche Alemania 1999 0
Campeche Alemania 2000 3.887.000.000.000.000
Campeche Alemania 2001 0
Campeche Alemania 2002 0
Campeche Alemania 2003 0
Campeche Alemania 2004 0