<?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: how to use proc sql to do some special calculation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262263#M57662</link>
    <description>&lt;P&gt;You might as well do it in one go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
input ID DAY RETURN;
cards;
1 1 0.2
1 2 0.2
1 3 0.3
2 10 0.2
2 12 0.1
2 12 0.2
3 11 0.2
3 12 0.6
3 13 0.2
run;

data WANT ;
  set HAVE;
  by ID;
  PREV_RETURN=lag(RETURN);
  if lag(first.ID);
  MEAN=mean(PREV_RETURN, RETURN);
run;

proc print;
  var ID MEAN;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Print: Data Set WORK.WANT"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;ID&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;MEAN&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0.20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;0.15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;0.40&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Fri, 08 Apr 2016 02:18:55 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2016-04-08T02:18:55Z</dc:date>
    <item>
      <title>how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261627#M57626</link>
      <description>&lt;P&gt;Hi, I want to use proc sql to calculate sum of some observations group by certain variable, but subject to some constraint. Below is the detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have some stocks and their returns for each day. I would like to calculate the mean of daily returns for each stock ID, but only the first few days, for example, the first two days.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Day &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Return&lt;/P&gt;
&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/P&gt;
&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.3&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.6&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The program below will give full average of daily returns for each ID, but not the first two days for each ID. How to revise it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;create table want as&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;select *, mean(return) as avg_ret&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;from from&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;group by ID;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 08:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261627#M57626</guid>
      <dc:creator>SeanZ</dc:creator>
      <dc:date>2016-04-06T08:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261630#M57627</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming variable &lt;STRONG&gt;Day &lt;/STRONG&gt;has values 1 and 2 this will do it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select t1.*, t2.avg_ret&lt;BR /&gt;from have t1 left join&lt;BR /&gt;(select ID, mean(return) as avg_ret from have where day le 2 group by ID) t2&lt;BR /&gt;on t1.id=t2.id;&lt;BR /&gt;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 08:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261630#M57627</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-04-06T08:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261634#M57628</link>
      <description>&lt;P&gt;Simple?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select *, mean(return) as avg_ret
from from
group by ID
where day in (1,2)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Apr 2016 09:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261634#M57628</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-06T09:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261796#M57635</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;:&amp;nbsp;I think the WHERE clause must precede the GROUP BY clause.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 15:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261796#M57635</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-06T15:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261928#M57654</link>
      <description>&lt;P&gt;day 1 and 2 are just examples. In reality, the variable day is in terms of date and it's not necessarily continuous. I only want to use the first few observations, say, the first 10 observations in each group (ID). How can that be done?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 20:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261928#M57654</guid>
      <dc:creator>SeanZ</dc:creator>
      <dc:date>2016-04-06T20:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261955#M57655</link>
      <description>&lt;P&gt;I think it would be easier (and more efficient) to select the first n observations per ID using a data step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create test data */
data have;
input ID Day Return;
cards;
1 1 0.2
1 2 0.2
1 3 0.3
2 1 0.2
2 2 0.1
2 3 0.2
3 1 0.2
3 2 0.6
3 3 0.2
;

%let n=2;

/* Select first (i.e. earliest) n obs. per ID */
data temp / view=temp;
set have;
by id day;
if first.id then c=1;
else c+1;
if c&amp;lt;=&amp;amp;n;
drop c;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you could apply your original PROC SQL step to TEMP rather than HAVE (what you called "FROM").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, here is a pure PROC SQL approach:&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 *, mean(return) as avg_ret
from (select * from have a
      where (select count(*) from have where id=a.id &amp;amp; .&amp;lt;day&amp;lt;=a.day)&amp;lt;=&amp;amp;n)
group by id
order by id, day;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here, TEMP is replaced by an inline view (which, in addition, involves a subquery in its WHERE clause).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is assumed that the order of DAY values corresponds to chronological order. Unlike the data step, the PROC SQL step does not require dataset HAVE to be sorted (by ID, DAY). Furthermore, there should be no duplicate DAY values within an ID.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 23:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/261955#M57655</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-06T23:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262000#M57657</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@FreelanceReinhard wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;:&amp;nbsp;I think the WHERE clause must precede the GROUP BY clause.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Correct.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 06:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262000#M57657</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-07T06:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262263#M57662</link>
      <description>&lt;P&gt;You might as well do it in one go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
input ID DAY RETURN;
cards;
1 1 0.2
1 2 0.2
1 3 0.3
2 10 0.2
2 12 0.1
2 12 0.2
3 11 0.2
3 12 0.6
3 13 0.2
run;

data WANT ;
  set HAVE;
  by ID;
  PREV_RETURN=lag(RETURN);
  if lag(first.ID);
  MEAN=mean(PREV_RETURN, RETURN);
run;

proc print;
  var ID MEAN;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Print: Data Set WORK.WANT"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;ID&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;MEAN&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0.20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;0.15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;0.40&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 08 Apr 2016 02:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262263#M57662</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-04-08T02:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262264#M57663</link>
      <description>&lt;P&gt;For an arbitrary nb of obs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
input ID DAY RETURN;
cards;
1 1 0.2
1 2 0.2
1 3 0.3
2 10 0.2
2 12 0.1
2 12 0.2
3 11 0.2
3 12 0.6
3 13 0.2
run;

%let nb_obs=2;

data WANT ;
  set HAVE;
  by ID;
  if first.ID then call missing(SUM,OBS);
  SUM+RETURN;
  OBS+1;
  if OBS=&amp;amp;nb_obs. or (OBS &amp;lt; &amp;amp;nb_obs. &amp;amp; last.ID) then do;
    MEAN=divide(SUM, OBS);
    output;
  end;
run;

proc print;
  var ID MEAN;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Apr 2016 02:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262264#M57663</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-04-08T02:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc sql to do some special calculation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262293#M57664</link>
      <description>&lt;P&gt;If you really must use SQL (but SQL is not suited&amp;nbsp;to processing rows in a certain order), something as ugly as this works in SAS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let nb_obs=2;

proc sql nothreads;

create table WANT(keep=ID MEAN) as
select 
      a.ID
     , monotonic()    as ROW
     , mean(a.RETURN) as MEAN 
from HAVE              a
    ,( select ID
            , min(monotonic()) as GRP_START  
       from HAVE 
       group by ID 
      )                b
where a.ID=b.ID 
  and calculated ROW&amp;lt;b.GRP_START+&amp;amp;nb_obs.
group by a.ID 
;

quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Print: Data Set WORK.WANT"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;ID&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;MEAN&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0.20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;0.15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;0.40&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 05:25:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-use-proc-sql-to-do-some-special-calculation/m-p/262293#M57664</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-04-08T05:25:18Z</dc:date>
    </item>
  </channel>
</rss>

