Features: 
GROUP BY clause HAVING clause

Table names:  STORES 
proc sql; title 'Each House and the Closest Store'; select house, store label='Closest Store', sqrt((abs(s.xh.x)**2)+(abs(h.ys.y)**2)) as dist label='Distance' format=4.2 from stores s, houses h
group by house having dist=min(dist);
proc sql; title 'Each House and the Closest Store'; select house, store label='Closest Store', sqrt((abs(s.xh.x)**2)+(abs(h.ys.y)**2)) as dist label='Distance' format=4.2 from stores s, houses h