BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
wlierman
Lapis Lazuli | Level 10

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 

 

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

HI , Wouldn't you need to include claimtype in

 GROUP BY claimtypedesc,claimtype

View solution in original post

2 REPLIES 2
novinosrin
Tourmaline | Level 20

HI , Wouldn't you need to include claimtype in

 GROUP BY claimtypedesc,claimtype
wlierman
Lapis Lazuli | Level 10

Hi,

 

Thank you very much.

 

You nailed it. Exactly what I was looking for.

 

Walt Lierman

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1174 views
  • 1 like
  • 2 in conversation