<?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: First. Last. Using Proc Sql in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587740#M14735</link>
    <description>&lt;P&gt;Have you tried my code above?&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 07:17:03 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-09-11T07:17:03Z</dc:date>
    <item>
      <title>First. Last. Using Proc Sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587729#M14732</link>
      <description>&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bellow is the code i run :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data SAm;&lt;BR /&gt;input Name $ Item $ Value ;&lt;BR /&gt;cards;&lt;BR /&gt;nehemiah ball 20&lt;BR /&gt;nehemiah bat 100&lt;BR /&gt;nehemiah glouse 50&lt;BR /&gt;naari battary 14&lt;BR /&gt;naari remote 40&lt;BR /&gt;naari cover 120&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want output like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;naari&amp;nbsp; &amp;nbsp; battary&amp;nbsp; 14&lt;/P&gt;&lt;P&gt;nehemiah ball 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me with the code Proc Sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 06:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587729#M14732</guid>
      <dc:creator>Nehemiah</dc:creator>
      <dc:date>2019-09-11T06:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: First. Last. Using Proc Sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587732#M14733</link>
      <description>&lt;P&gt;I assume that what you want is to take the obs with the minimum &lt;STRONG&gt;value&lt;/STRONG&gt;&amp;nbsp;for each name? If you want to do so with PROC SQL, this has nothing to do with first./last. logic, which is a SAS Data Step concept.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table want as
    select * from sam
    group by name
    having value=min(value);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;name      item     value

naari     battary  14   
nehemiah  ball     20    &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 06:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587732#M14733</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-11T06:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: First. Last. Using Proc Sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587737#M14734</link>
      <description>&lt;P&gt;thanks for the Solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and wrote a code in data step like this&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc sort Data =Sam out=Sam_srt ;&lt;BR /&gt;By Name ;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Sam_1 ;&lt;BR /&gt;Set Sam_srt;&lt;BR /&gt;By Name ;&lt;BR /&gt;If First.name ;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sir&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want output based on Name only.and can you write the code for above data step into Proc SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 07:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587737#M14734</guid>
      <dc:creator>Nehemiah</dc:creator>
      <dc:date>2019-09-11T07:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: First. Last. Using Proc Sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587740#M14735</link>
      <description>&lt;P&gt;Have you tried my code above?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 07:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587740#M14735</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-11T07:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: First. Last. Using Proc Sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587742#M14736</link>
      <description>yeah..its working perfectly..</description>
      <pubDate>Wed, 11 Sep 2019 07:24:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587742#M14736</guid>
      <dc:creator>Nehemiah</dc:creator>
      <dc:date>2019-09-11T07:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: First. Last. Using Proc Sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587744#M14737</link>
      <description>&lt;P&gt;Good. Please mark my answer as an accepted solution to help future users navigate the community&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 07:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/First-Last-Using-Proc-Sql/m-p/587744#M14737</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-11T07:31:08Z</dc:date>
    </item>
  </channel>
</rss>

