Apology PG. I made a mistake to copy dataset. I updated the table along with output. Please check once. The problem is that partition by clause is not supported by SAS. The below SQL approach is taken. select study,seq,event,gender,risk_factor,freq,SD,median,mode,covariance from (select study,seq,event,gender,risk_factor,freq,SD,median,mode,covariance, count(distinct gender) over (partition by event) cnt1, count(distinct risk_factor) over (partition by event) cnt2, count(distinct freq||'#'||SD||'#'||median||'#'||mode||'#'||covariance) over (partition by event) cnt3, count(*) over(partition by event) cnt from trial_study) where cnt > 1 and 1 in (cnt1,cnt2,cnt3)
... View more