I have written the following short query
proc sql noprint;
CREATE table aqc_puds.data_count_claim AS
SELECT
claimtypedesc,
claimtype,
Count(claim)
FROM aqc_puds.base_yr_pudset
GROUP BY claimtypedesc;
quit;
Desired output data (hypothetical numbers):
Claimtypedesc count
dental 1534236
inpatient 22342522
professional 44999900
....... and so on ......
there should be about 10 rows - one for every claimtype - with claims counted over each claimtype
actual output data
Claimtypedesc count
dental 15151016
dental 15151016
. .
. .
. .
and so on for each dental claim
So the dilemma is to obtain the first hypothetical table rather than the erroneous actual table.
This is likely a pretty straightforward solution. However, I haven't been able to crack the code and
so your expertise is very appreciated.
Walt Lierman
HI , Wouldn't you need to include claimtype in
GROUP BY claimtypedesc,claimtype
HI , Wouldn't you need to include claimtype in
GROUP BY claimtypedesc,claimtype
Hi,
Thank you very much.
You nailed it. Exactly what I was looking for.
Walt Lierman
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.