hello I have this dataset: data new; infile datalines; input ID $ Name $ Nationality $ Price; datalines; 01 Hans Y 130 02 Pierre Y 100 03 Marko N 80 04 Ivan N 95 05 John Y 120 06 Ana N 75 07 Petra N 45 ; I would like, as result to have new dataset with two new variables which would count the number of Nationality(Y) and Nationality(N), something like this proc print data=result; run; obs Number_of_Y Number_of_N 1 3 4 I got this by using proc sql, created two views, based on them i created new tabel named result. I would like to know how to do this using data step programming or some better way using proc sql queries. Thank you
... View more