1 The SAS System 18:00 Thursday, October 10, 2002 NOTE: Copyright (c) 1989-1995 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 6.11 TS020 Licensed to SINJONTEK Site 0009091941 This message is contained in the SAS news file, and is presented upon initialization. Edit the files "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. 2 The SAS System 18:00 Thursday, October 10, 2002 36 /* Total| Value | Error | Value | Error| Value | Error | Value | Error 37 /*WEIGHTED PERSON COUNT 38 /*FAMILIES */ 39 cards; NOTE: The data set WORK.POVERTY has 51 observations and 11 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.02 seconds 91 ; 92 93 /*---------------------------------------------------*/ 94 /*-- USING EMBEDDED SQL: --*/ 95 /*-- Which states have poverty rates greater than --*/ 96 /*-- the national average? --*/ 97 /*---------------------------------------------------*/ 98 99 proc sql; 100 title 'U.S. STATES WITH THE HIGHEST PERCENTAGES OF PEOPLE AT RISK FOR POVERTY'; 101 title2 'Sorted by percentage. Individuals at risk listed in THOUSANDS.'; 102 select state, pctjab as at_risk format=6.2, (anv - bnv) as THOUSNDS 103 from poverty 104 having ((anv - bnv) / total) > (sum(anv) - sum(bnv))/sum(total) 105 order by pctjab desc; NOTE: The query as specified involves ordering by an item that doesn't appear in its SELECT clause. NOTE: The query requires remerging summary statistics back with the original data. 106 quit; NOTE: The PROCEDURE SQL printed page 1. NOTE: PROCEDURE SQL used: real time 0.01 seconds cpu time 0.02 seconds NOTE: The SAS System used: real time 0.16 seconds cpu time 0.11 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414