I am having some data by group and would want to create a dummy of whether there’s at least one case of non-missing value.
Below is an example of my dataset. Notably, I have included a variable with my desired outcome. Groups AAA, CCC and DDD have at least one non-missing case.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str3 group byte(price desired_outcome)
"AAA" . 1
"AAA" 1 1
"AAA" 3 1
"BBB" . 0
"BBB" . 0
"CCC" 1 1
"DDD" 2 1
"DDD" . 1
"EEE" . 0
"EEE" . 0
"EEE" . 0
end
Thanks in advance!