SAS Proc SQL Count Issue -


i have 1 column of data , column named (daily_mileage). have 15 different types of daily mileages , 250 rows. want separate count each of 15 daily mileages. using proc sql in sas , not cross join command. not sure should started:

 proc sql; select a, b (select count(daily_mileage) work.full daily_mileage = 'farm utility vehicle (class 7)') cross join (select count(daily_mileage) b work.full daily_mileage = 'farm truck light (class 35)') b); quit; 

use case statements define counts below.

proc sql;   create table submit   select sum(case when daily_mileage = 'farm utility vehicle (class 7)'                   1 else 0 end) a,          sum(case when daily_mileage = 'farm truck light (class 35)'                   1 else 0 end) b   work.full   ; quit ; 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -