<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PROC SQL: Functions after WHERE not allowed. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8083#M298</link>
    <description>proc sql;&lt;BR /&gt;
 create table new as&lt;BR /&gt;
 select * from old&lt;BR /&gt;
 where calculated min(x) ge 5 and calculated min(x) le 10&lt;BR /&gt;
 group by id;&lt;BR /&gt;
quit;</description>
    <pubDate>Tue, 27 Oct 2009 20:05:45 GMT</pubDate>
    <dc:creator>abdullala</dc:creator>
    <dc:date>2009-10-27T20:05:45Z</dc:date>
    <item>
      <title>PROC SQL: Functions after WHERE not allowed.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8082#M297</link>
      <description>This code is incorrect: &lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table new as&lt;BR /&gt;
select * from old&lt;BR /&gt;
where id in (select distinct id from old&lt;BR /&gt;
where min(x) ge 5 and min(x) le 10);&lt;BR /&gt;
quit; &lt;BR /&gt;
&lt;BR /&gt;
I want ALL records for EACH individual(id) whose minimum value for x is in the interval [5,10]. &lt;BR /&gt;
 &lt;BR /&gt;
How can I get those records?</description>
      <pubDate>Tue, 27 Oct 2009 19:54:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8082#M297</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-27T19:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL: Functions after WHERE not allowed.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8083#M298</link>
      <description>proc sql;&lt;BR /&gt;
 create table new as&lt;BR /&gt;
 select * from old&lt;BR /&gt;
 where calculated min(x) ge 5 and calculated min(x) le 10&lt;BR /&gt;
 group by id;&lt;BR /&gt;
quit;</description>
      <pubDate>Tue, 27 Oct 2009 20:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8083#M298</guid>
      <dc:creator>abdullala</dc:creator>
      <dc:date>2009-10-27T20:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL: Functions after WHERE not allowed.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8084#M299</link>
      <description>The code above does not work. Please check before posting.&lt;BR /&gt;
&lt;BR /&gt;
I want ALL records for EACH gender whose maximum value for age is in the interval [16,17]: &lt;BR /&gt;
    &lt;BR /&gt;
  select * &lt;BR /&gt;
  from sashelp.class&lt;BR /&gt;
  group by sex&lt;BR /&gt;
  having  16 le max(age) le 17&lt;BR /&gt;
  ;</description>
      <pubDate>Wed, 28 Oct 2009 01:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-Functions-after-WHERE-not-allowed/m-p/8084#M299</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-10-28T01:54:50Z</dc:date>
    </item>
  </channel>
</rss>

