Hi all, I have a question that has been bugging me for a while now. Problem: I am given unique patient id's (accessionnumber) and blood sample test dates with patients receiving multiple blood samples. The question is how to count the number of samples each patient receives (No. of Samples) and how many patients are in each sample size (No. of patients). I have no problem finding the No. of samples, but how do i count how many people are in each sample size ie. how many people have one sample, how many people have two etc. I have included code for what i have done. Thanks! proc sql; select distinct count(*) as nofpats from ( select distinct accessionnumber from a.labresults_ontherapy) ; quit;
... View more