Dear stata-community,
I would like to have a list of how many patients that has a certain age, but only counting each patient-ID once.

So I need a list something like
age_2012 age_2019
19 freq 2 18 freq 1
28 freq 1 26 freq 2
32 freq 4 39 freq 4

The reason I need for both 2012 and 2019 is that some of the patients from 2012 has left, and new patients have come into my data-material.

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input byte pasID str2(age_2012 age_2019)
1 "32" "39"
1 "32" "39"
2 "28" "."
2 "28" "."
2 "28" "."
3 "19" "26"
3 "19" "26"
3 "19" "26"
3 "19" "26"
4 "32" "39"
4 "32" "39"
5 "19" "26"
6 "32" "39"
6 "32" "39"
7 "32" "39"
8 "."  "18"
8 "."  "18"
end
I also have the variables "birthyear" and "year".

Thank you, Cathrine