<?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: Group By one column in Teradata in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621452#M8720</link>
    <description>&lt;P&gt;Yes, I want a column of var by GroupA only, Group AB only, Group ABC only. Teradata seems a little harder to do that (in DI Studio). As you say, the answer is probably in the Group By Rollup variations. Thanks. &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 15:39:56 GMT</pubDate>
    <dc:creator>crawfe</dc:creator>
    <dc:date>2020-01-31T15:39:56Z</dc:date>
    <item>
      <title>Group By one column in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621127#M8715</link>
      <description>&lt;P&gt;Hi. I am learning to work with teradata code in DI Studio to speed up processing of large tables&lt;/P&gt;&lt;P&gt;(Advice from my admin).&lt;/P&gt;&lt;P&gt;This might be more of a strategy question. How to SUM by a Group A only.&lt;/P&gt;&lt;P&gt;The Group By requires all the non-aggregated columns to be listed, which seems awkward.&lt;/P&gt;&lt;P&gt;Please correct me if I understand it wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HAVE: Columns A B C D(variable)&lt;/P&gt;&lt;P&gt;WANT:&amp;nbsp;&amp;nbsp; The SUM of D(variable) Grouped By A only.&lt;/P&gt;&lt;P&gt;If 3 different A values:&lt;/P&gt;&lt;P&gt;3 groups: Group A1 - sum(Dvar), Group A2 - sum(Dvar), Group A3 - sum(Dvar)&lt;/P&gt;&lt;P&gt;HOW (in TD): SUM(D(variable); Group By A B C (must include all columns?!)&lt;/P&gt;&lt;P&gt;GET?:&lt;/P&gt;&lt;P&gt;3 x 3 combinations of grouping: A1B1C1 sum(Dvar), A1B1C2 sum(Dvar), A1B1C3 sum(Dvar)etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could do brute force and split off a table of A D(variable), perform my sum/group, then rejoin.&lt;/P&gt;&lt;P&gt;Is there a more efficient way?&lt;/P&gt;&lt;P&gt;Any advice would be appreciated! Eventually this will be reported in Viya.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 13:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621127#M8715</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2020-01-30T13:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Group By one column in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621264#M8718</link>
      <description>&lt;P&gt;It is is not at all clear what you are asking for.&amp;nbsp; Are you asking to generate output like you would get with PROC SUMMARY where you have some rows that represents values grouped say just variable A and others where the data is grouped by A and B. Or A, B and C.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so then you probably are looking for the CUBE GROUPING SETS feature of Teradata.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.teradata.com/reader/b8dd8xEYJnxfsq4uFRrHQQ/5uCbXZ6cjrhyOZfoCwkiDg" target="_blank"&gt;https://docs.teradata.com/reader/b8dd8xEYJnxfsq4uFRrHQQ/5uCbXZ6cjrhyOZfoCwkiDg&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 18:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621264#M8718</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-30T18:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Group By one column in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621452#M8720</link>
      <description>&lt;P&gt;Yes, I want a column of var by GroupA only, Group AB only, Group ABC only. Teradata seems a little harder to do that (in DI Studio). As you say, the answer is probably in the Group By Rollup variations. Thanks. &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 15:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Group-By-one-column-in-Teradata/m-p/621452#M8720</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2020-01-31T15:39:56Z</dc:date>
    </item>
  </channel>
</rss>

