Hi All,
I have a dataset with approx 30 variables and I want to find out number of unique observation count for each variable
For ex:
data sample;
input empid sal name$;
cards;
101 1000 aaa
102 2000 bbb
103 2000 ccc
104 1000 ddd
run;
proc sql;
create table count as
select count(distinct(empid)) as count_eid,
count(distinct(sal)) as count_sal,
count(distinct(name)) as count_name
from sample;
quit;
the above query results to
4, 2 and 4
My problem is i want to automate the query rather than writing all the 30 variables in select query.
so, please reply me ASAP.