<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filter-based-on-max-in-SQL/m-p/895030#M353566</link>
    <description>&lt;P&gt;If you wish to filter on an aggregation use the HAVING key word, like&lt;/P&gt;
&lt;P&gt;Having height = max(height)&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 11:35:52 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2023-09-20T11:35:52Z</dc:date>
    <item>
      <title>Filter based on max() in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-based-on-max-in-SQL/m-p/895027#M353564</link>
      <description>&lt;P&gt;&lt;BR /&gt;Only extract max height values&amp;nbsp; based on sex and iam tried below code &lt;BR /&gt;proc sql ;&lt;BR /&gt;select *, max(height) as height &lt;BR /&gt;from clss &lt;BR /&gt;group by sex ;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;Data following:&lt;/P&gt;
&lt;P&gt;data clss ;&lt;BR /&gt;input Name$ Sex$ Age Height Weight ; &lt;BR /&gt;cards ;&lt;BR /&gt;ghj F 14 50.5 75&lt;BR /&gt;HGG F 15 55 80&lt;BR /&gt;TYY M 14 52 75&lt;BR /&gt;OIU F 15 54 81&lt;BR /&gt;POI M 16 65 72&lt;BR /&gt;POJ M 15 62 87&lt;BR /&gt;KJN F 16 60 81&lt;BR /&gt;JHB M 14 61 75&lt;BR /&gt;HGV M 11 60 57&lt;BR /&gt;NHJ F 12 75 75&lt;BR /&gt;JHB M 13 70 55&lt;BR /&gt;HGS F 14 65 60&lt;BR /&gt;TRT M 13 60 55&lt;BR /&gt;QWA F 14 51 65&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;I need output like this &lt;BR /&gt;name sex age height weight&lt;BR /&gt;NHJ&amp;nbsp; &amp;nbsp; &amp;nbsp;F&amp;nbsp; &amp;nbsp; 12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;75&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;75&lt;BR /&gt;JHB&amp;nbsp; &amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp;13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;70&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;55&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 11:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-based-on-max-in-SQL/m-p/895027#M353564</guid>
      <dc:creator>112211</dc:creator>
      <dc:date>2023-09-20T11:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-based-on-max-in-SQL/m-p/895030#M353566</link>
      <description>&lt;P&gt;If you wish to filter on an aggregation use the HAVING key word, like&lt;/P&gt;
&lt;P&gt;Having height = max(height)&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 11:35:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-based-on-max-in-SQL/m-p/895030#M353566</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-09-20T11:35:52Z</dc:date>
    </item>
  </channel>
</rss>

