<?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 Vertical summation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404246#M98260</link>
    <description>&lt;P&gt;I am attempting to do a column same sorted by two variables with proc sql but get the error message below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table sales as&lt;/P&gt;&lt;P&gt;select model, year&lt;/P&gt;&lt;P&gt;sum(revenue) as sum_revenue,&lt;/P&gt;&lt;P&gt;from carsales&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&lt;/P&gt;&lt;P&gt;Error 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &amp;amp;....&lt;/P&gt;&lt;P&gt;Error 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;group by model, year;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have&amp;nbsp;&lt;/P&gt;&lt;P&gt;model year revenue&lt;/P&gt;&lt;P&gt;acura&amp;nbsp; 2013&amp;nbsp; 15000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 30000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 150000&lt;/P&gt;&lt;P&gt;hyundai 2012&amp;nbsp; &amp;nbsp;300000&lt;/P&gt;&lt;P&gt;hyundai 2012 300000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want&amp;nbsp;&lt;/P&gt;&lt;P&gt;model year revenue sum_revenue&lt;/P&gt;&lt;P&gt;acura&amp;nbsp; 2013&amp;nbsp; 15000 15000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 30000 180000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 150000 180000&lt;/P&gt;&lt;P&gt;hyundai 2012&amp;nbsp; &amp;nbsp;300000 600000&lt;/P&gt;&lt;P&gt;hyundai 2012 300000 600000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000 3000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000 3000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000 3000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Oct 2017 21:29:24 GMT</pubDate>
    <dc:creator>Wafflecakes</dc:creator>
    <dc:date>2017-10-14T21:29:24Z</dc:date>
    <item>
      <title>Vertical summation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404246#M98260</link>
      <description>&lt;P&gt;I am attempting to do a column same sorted by two variables with proc sql but get the error message below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table sales as&lt;/P&gt;&lt;P&gt;select model, year&lt;/P&gt;&lt;P&gt;sum(revenue) as sum_revenue,&lt;/P&gt;&lt;P&gt;from carsales&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&lt;/P&gt;&lt;P&gt;Error 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &amp;amp;....&lt;/P&gt;&lt;P&gt;Error 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;group by model, year;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have&amp;nbsp;&lt;/P&gt;&lt;P&gt;model year revenue&lt;/P&gt;&lt;P&gt;acura&amp;nbsp; 2013&amp;nbsp; 15000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 30000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 150000&lt;/P&gt;&lt;P&gt;hyundai 2012&amp;nbsp; &amp;nbsp;300000&lt;/P&gt;&lt;P&gt;hyundai 2012 300000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want&amp;nbsp;&lt;/P&gt;&lt;P&gt;model year revenue sum_revenue&lt;/P&gt;&lt;P&gt;acura&amp;nbsp; 2013&amp;nbsp; 15000 15000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 30000 180000&lt;/P&gt;&lt;P&gt;acura 2014&amp;nbsp; &amp;nbsp; 150000 180000&lt;/P&gt;&lt;P&gt;hyundai 2012&amp;nbsp; &amp;nbsp;300000 600000&lt;/P&gt;&lt;P&gt;hyundai 2012 300000 600000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000 3000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000 3000000&lt;/P&gt;&lt;P&gt;bmw 2007 1000000 3000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 21:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404246#M98260</guid>
      <dc:creator>Wafflecakes</dc:creator>
      <dc:date>2017-10-14T21:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Vertical summation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404252#M98263</link>
      <description>&lt;P&gt;You’re missing a comma after YEAR. And no commas before FROM.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 22:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404252#M98263</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-14T22:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Vertical summation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404253#M98264</link>
      <description>&lt;P&gt;You are missing a comma after year.&amp;nbsp; You don't need the comma after sum_revenue.&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 model, 
	       year, 
	       revenue, 
	       sum(revenue) as sum_revenue 
	  from carsales 
	    group by model, year;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 14 Oct 2017 22:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404253#M98264</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2017-10-14T22:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Vertical summation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404610#M98348</link>
      <description>&lt;P&gt;If find that you will lose track of where your commas are much less if you place them at the beginning of your continuation lines instead of at the end. It is much easier to scan the beginning of the lines of a block of code than the end of the lines.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
create table sales as
  select model
       , year
       , sum(revenue) as sum_revenue
  from carsales
  group by model, year
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Oct 2017 21:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Vertical-summation/m-p/404610#M98348</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-10-16T21:51:18Z</dc:date>
    </item>
  </channel>
</rss>

