<?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/Proc-sql/m-p/788437#M252090</link>
    <description>&lt;PRE&gt;data a;
input party account$ balance;
datalines;
1 A1 50
1 A2 60
1 A3 30
2 A4 40
2 A5 50
3 A6 30
3 A7 90
;

proc sql;
create table want as
select * from a where party in
 (select party from a where balance&amp;gt;50) ;
quit;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Jan 2022 11:34:48 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-01-05T11:34:48Z</dc:date>
    <item>
      <title>Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788401#M252071</link>
      <description>&lt;P&gt;data a;&lt;BR /&gt;input party account$ balance;&lt;BR /&gt;datalines;&lt;BR /&gt;1 A1 50&lt;BR /&gt;1 A2 60&lt;BR /&gt;1 A3 30&lt;BR /&gt;2 A4 40&lt;BR /&gt;2 A5 50&lt;BR /&gt;3 A6 30&lt;BR /&gt;3 A7 90&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;write a query to fetch all accounts listed to the party who has at least one account having balnce greater than 50?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 06:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788401#M252071</guid>
      <dc:creator>Sanjeevas</dc:creator>
      <dc:date>2022-01-05T06:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788403#M252073</link>
      <description>&lt;P&gt;Welcome to the SAS Communities!&lt;/P&gt;
&lt;P&gt;Your question feels like homework/an exercise. What have you tried so far? Where do you get stuck?&lt;/P&gt;
&lt;P&gt;Post the code you've already developed even if not fully working yet.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 07:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788403#M252073</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-01-05T07:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788404#M252074</link>
      <description>&lt;P&gt;A sub-query is a good way of doing this type of question:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table want as 
  select A.*
  from A as A
  inner join
  (select party
         ,count(*) as Accounts_Count
   from A
   where balance &amp;gt; 50
   group by party
  ) as B
 on A.party = B.party;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jan 2022 07:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788404#M252074</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-01-05T07:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788406#M252076</link>
      <description>Thanks.!!</description>
      <pubDate>Wed, 05 Jan 2022 07:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788406#M252076</guid>
      <dc:creator>Sanjeevas</dc:creator>
      <dc:date>2022-01-05T07:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788411#M252078</link>
      <description>&lt;PRE&gt; why  calculate  count(*) as Accounts_Count... ?

proc sql;
  create table want as 
  select A.*
  from A as A
  inner join
      (&lt;STRONG&gt;select distinct party  from A&lt;/STRONG&gt;
       &lt;STRONG&gt;where balance &amp;gt; 50&lt;/STRONG&gt;
      ) as B
 on A.party = B.party;
quit;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jan 2022 09:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788411#M252078</guid>
      <dc:creator>AndreaVianello</dc:creator>
      <dc:date>2022-01-05T09:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788437#M252090</link>
      <description>&lt;PRE&gt;data a;
input party account$ balance;
datalines;
1 A1 50
1 A2 60
1 A3 30
2 A4 40
2 A5 50
3 A6 30
3 A7 90
;

proc sql;
create table want as
select * from a where party in
 (select party from a where balance&amp;gt;50) ;
quit;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jan 2022 11:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788437#M252090</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-01-05T11:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788445#M252095</link>
      <description>perfect !</description>
      <pubDate>Wed, 05 Jan 2022 12:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/788445#M252095</guid>
      <dc:creator>AndreaVianello</dc:creator>
      <dc:date>2022-01-05T12:35:21Z</dc:date>
    </item>
  </channel>
</rss>

