<?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: SAS Query in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538097#M6874</link>
    <description>&lt;P&gt;I agree&amp;nbsp; with you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;, the code could simplified in one step proc sql as below&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 year(date) as year, sum(units) as sum from sashelp.countseries group by year;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Feb 2019 16:55:18 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2019-02-24T16:55:18Z</dc:date>
    <item>
      <title>SAS Query</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538062#M6859</link>
      <description>&lt;P&gt;In sashelp there is a file name countseries (FOR SAS UNIVERSITY EDITION) , how can i make jan2004 to dec2004 into one major category as'2004 and add up all the units for 2004 and make a table consisting of only year and total units in that particular year.&lt;/P&gt;&lt;P&gt;Can anyone please explain this with the code.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2019 09:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538062#M6859</guid>
      <dc:creator>Sundeep_M</dc:creator>
      <dc:date>2019-02-24T09:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Query</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538066#M6860</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data countseries;
set sashelp.countseries;
year=year(date);
run;

proc sql;
create table want as select year, sum(units) as sum from countseries group by year;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Feb 2019 10:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538066#M6860</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-02-24T10:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Query</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538070#M6861</link>
      <description>&lt;P&gt;thank you sir&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2019 11:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538070#M6861</guid>
      <dc:creator>Sundeep_M</dc:creator>
      <dc:date>2019-02-24T11:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Query</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538071#M6862</link>
      <description>Hi Sundeep, If it helped you, could you please mark the this as answered so it helps future users narrow down what responses to look at.</description>
      <pubDate>Sun, 24 Feb 2019 12:08:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538071#M6862</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-02-24T12:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Query</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538095#M6873</link>
      <description>&lt;P&gt;The solution should be just one pass of sql.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A datastep to compute year and then proc sql for by group is very costly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select clause can be used to compute year&lt;/P&gt;
&lt;P&gt;and the computed column can be used as grouping var.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2019 16:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538095#M6873</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-02-24T16:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Query</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538097#M6874</link>
      <description>&lt;P&gt;I agree&amp;nbsp; with you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;, the code could simplified in one step proc sql as below&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 year(date) as year, sum(units) as sum from sashelp.countseries group by year;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2019 16:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Query/m-p/538097#M6874</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-02-24T16:55:18Z</dc:date>
    </item>
  </channel>
</rss>

