I have data about doctors and their patients. Every doctor has an ID. And one doctor could treat several patients, so his ID could be repeated. I need to know how many doctors of each specialty are in Texas and New York. Doctors specialties, not how many patients they treated. How can I do it? Help me please!

Code:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(sex id) long speciality double city
2  7 7 1
1 17 2 1
2 11 6 1
1 18 7 1
1  6 7 1
2 23 3 1
1  9 8 1
1 22 3 1
1 20 4 1
1  3 2 1
1 12 1 1
1  1 2 1
2 13 7 1
1  2 4 1
1 21 6 1
2 10 6 1
1  4 2 2
1 14 7 2
1 16 2 2
1  8 8 2
2  5 7 2
1 15 2 2
2 19 6 2
1 24 5 2
1 17 2 1
1  2 4 1
1 16 1 2
end
label values speciality speciality
label def speciality 1 "cardilogy", modify
label def speciality 2 "cardiology", modify
label def speciality 3 "dantist", modify
label def speciality 4 "dermatology", modify
label def speciality 5 "endocrinology", modify
label def speciality 6 "intmed", modify
label def speciality 7 "oncology", modify
label def speciality 8 "ophtalmology", modify
label values city city
label def city 1 "NY", modify
label def city 2 "Texas", modify