10-04-2013 02:56 AM
Please try the below code
input id Acct_no;
create table want as select count(distinct id) as id_count, count(distinct Acct_no) as Acct_no_count from have;
10-04-2013 10:38 AM
Here is a Hash() approach that is technically producing the same outcome as Proc SQL in ONE step/query:
keep id_ct acct_ct;
if 0 then set have;
declare hash acct(dataset:'have');
declare hash i(dataset:'have');
10-05-2013 06:12 PM
In current SAS High Performance (HP), one common foundation HP PROC is HPDMDB where you can code like this
proc hpdmdb data=&outdsn. classout=outdsn varout=v maxlevel=15000000; /*if you set a small #, it wraps the rest into OTHERS*/
class _all_ ; /*list all the variables in the data set including interval, numeric as well as categorical*/
The result will show % of each unique value and their levels. For very continuous variables, it does indeed appear very miscellaneous.
If you have Enterprise Miner license, you should be able to use proc DMDB. The difference is when the data set gets big, or when the table does not have too many observations, but you have many columns to count, then it may take some time. Proc HPDMDB runs much faster. It leverages multi-threading capabilities on your computers. If you are set up to run on parallel nodes with in-memory, it will be much, much faster.