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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.