<?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: Average in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752838#M29826</link>
    <description>How can I calculate the average in a proc sql using group by statement?</description>
    <pubDate>Thu, 08 Jul 2021 11:15:20 GMT</pubDate>
    <dc:creator>nhev</dc:creator>
    <dc:date>2021-07-08T11:15:20Z</dc:date>
    <item>
      <title>Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752747#M29800</link>
      <description>1)How to calculate average using proc summary by cars and road? Then use the summary to calculate the average of customers who applied for open market cars for a debt consolidation.&lt;BR /&gt;&lt;BR /&gt;2)Then merge that average with another average. Decide which field to merge on.</description>
      <pubDate>Wed, 07 Jul 2021 22:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752747#M29800</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T22:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752751#M29804</link>
      <description>Only the first part of your first question makes sense. The rest does not - remember we literally only see exactly what you post not your homework assignment so have no idea what you mean by 'Then use the summary to calculate the average of customers who applied for open market cars for a debt consolidation.'&lt;BR /&gt;&lt;BR /&gt;Either ask very specific questions (How do I calculate the average mpg_city for the sashelp.cars data set for each Origin), or more generic questions (How to calculate an average for each group in a data set)</description>
      <pubDate>Wed, 07 Jul 2021 23:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752751#M29804</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-07T23:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752754#M29807</link>
      <description>Sorry the second question just meant use the average you just calculate and another average from another question and merge them together using 2 different variables roads and cara and also the method they used to apply debt consolidation and the question asking you to decide which average to merge first</description>
      <pubDate>Wed, 07 Jul 2021 23:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752754#M29807</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T23:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752759#M29809</link>
      <description>&lt;P&gt;The "order" of a merge shouldn't matter unless you're filtering.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you think it matters? Does doing it different ways give you different results?&lt;/P&gt;
&lt;P&gt;The fastest way to answer some of these types of questions is to try them both and see what works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Sorry the second question just meant use the average you just calculate and another average from another question and merge them together using 2 different variables roads and cara and also the method they used to apply debt consolidation and the question asking you to decide which average to merge first&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 02:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752759#M29809</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-08T02:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752828#M29819</link>
      <description>&lt;P&gt;Hello, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;, you have been asked to clarify and provide more detailed information. We really can't move forward without this information.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 10:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752828#M29819</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-08T10:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752829#M29820</link>
      <description>It’s just a requirement of the question choosing what to merge first</description>
      <pubDate>Thu, 08 Jul 2021 10:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752829#M29820</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T10:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752830#M29821</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13573"&gt;@Paige&lt;/a&gt; do you know by any chance how to use KEEP statement in SQL?</description>
      <pubDate>Thu, 08 Jul 2021 10:43:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752830#M29821</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T10:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752832#M29822</link>
      <description>&lt;P&gt;SQL does not have a KEEP&amp;nbsp;&lt;EM&gt;statement&lt;/EM&gt; or&amp;nbsp;&lt;EM&gt;clause&lt;/EM&gt;, but you can use the KEEP=&amp;nbsp;&lt;EM&gt;dataset option&lt;/EM&gt; on incoming and outgoing datasets.&lt;/P&gt;
&lt;P&gt;In most cases, this is not needed, as you define the variables to be kept/created in the SELECT clause/statement.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 10:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752832#M29822</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-08T10:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752833#M29823</link>
      <description>Thank you very much</description>
      <pubDate>Thu, 08 Jul 2021 11:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752833#M29823</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T11:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752836#M29824</link>
      <description>What about RENAME in sql?</description>
      <pubDate>Thu, 08 Jul 2021 11:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752836#M29824</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T11:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752837#M29825</link>
      <description>How can I calculate the aversion in a proc sql using group by statement?</description>
      <pubDate>Thu, 08 Jul 2021 11:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752837#M29825</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T11:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752838#M29826</link>
      <description>How can I calculate the average in a proc sql using group by statement?</description>
      <pubDate>Thu, 08 Jul 2021 11:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752838#M29826</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T11:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752840#M29827</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13573"&gt;@Paige&lt;/a&gt; do you know by any chance how to use KEEP statement in SQL?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So far, one other person and myself have asked you to explain the problem in more detail. You are just going to ignore this request; and this is not a good way to get help on your problem. The people in this forum provide excellent help, but we can't help if you don't explain further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, when the original problem talks about PROC SUMMARY and then you switch to SQL without providing a reason, then we are further confused. Again, confusing us is not a good way to get help.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 11:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752840#M29827</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-08T11:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752841#M29828</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How can I calculate the average in a proc sql using group by statement?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Simple:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
  select
    sex,
    avg(age) as avg_age
  from sashelp.class
  group by sex
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Jul 2021 11:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752841#M29828</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-08T11:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752842#M29829</link>
      <description>It is just two different questions so I just didn’t switch from sql to proc summary but Thank you</description>
      <pubDate>Thu, 08 Jul 2021 11:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752842#M29829</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-08T11:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752843#M29830</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;What about RENAME in sql?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Same as KEEP.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 11:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752843#M29830</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-08T11:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Average</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752910#M29832</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How can I calculate the aversion in a proc sql using group by statement?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How do you calculate an "aversion" in SQL without a group by statement? I haven't ever had to calculate an "aversion" before and haven't a clue where to start.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This forum prefers that a question relates to a single topic, or interactive topics around a process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding random questions not related to a previous question we prefer to see a new thread that is easier for folks to read and follow when they find the topic from a search somewhere. Adding non-related topics to the subject line makes that harder for inexperienced SAS users to find solutions to their problems.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 16:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Average/m-p/752910#M29832</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-08T16:06:19Z</dc:date>
    </item>
  </channel>
</rss>

