Proc Sql;
Create table UR2016 as
select Name, mean(rate) as ur
from sql.combined as c, sql.postalcodes as p
where p.code=c.state_id and year=2016
group by name;
/* step 2 - perform the match */
Proc Sql;
Title "Matched pairs of states whose 2016 average
unemployment rates where within 0.02% of each other";
select f1.name as n1, f2.name as n2, f1.ur as ur1, f2.ur as ur2
from ur2016 as f1, ur2016 as f2
where abs(ur1-ur2)<0.02 and n1 ne n2;
出来了~~~~~~~~


雷达卡



京公网安备 11010802022788号







