| Date: | Thu, 24 Jun 2010 11:41:26 -0400 |
| Reply-To: | Subscribe Sas-L Jkr <jayakumarreddy@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Subscribe Sas-L Jkr <jayakumarreddy@GMAIL.COM> |
| Subject: | PROC SQL |
|---|
Hello
i have huge dataset with 3 columns
i have a following query
i want to get Prvdr_NUm with more than one ORG_NPI_NUM and those ORG_NPI_NUM
with unique CLM_THRU_DT
ex:) source table
x y D
1 2 09
1 2 09
1 2 10
1 2 11
2 3 09
2 3 08
2 3 09
2 4 09
2 4 09
target
x y D
1 2 09
1 2 10
1 2 11
2 3 09
2 3 08
2 4 09
proc sql;
create table dataset.PRVDR1_MORENPI as
select PRVDR_NUM, org_NPI_NUM, CLM_THRU_DT, count (distinct (CLM_THRU_DT))
as number
from FILTER_FOR_OUT_CLM_SAF_LDS_2008_
group by PRVDR_NUM, ORG_NPI_NUM, CLM_THRU_DT
having number > 1
order by number;
quit;
Any help
thanks
|