<?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: nested loops sql or dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622475#M183115</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp; I like your diligence and wasn't sure of that part too. The WANT shown by OP seems to suggest a straight forward GROUP BY sum/count respectively.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2020 15:14:16 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-02-05T15:14:16Z</dc:date>
    <item>
      <title>nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622453#M183102</link>
      <description>&lt;P&gt;I have the following table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;DATE&lt;/TD&gt;&lt;TD&gt;actual&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;1/2/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;1/2/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;1/4/2019&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;1/5/2019&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;1/6/2019&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2222&lt;/TD&gt;&lt;TD&gt;1/4/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2222&lt;/TD&gt;&lt;TD&gt;1/5/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2222&lt;/TD&gt;&lt;TD&gt;1/6/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;1/6/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;1/10/2019&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;1/10/2019&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;1/13/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;1/14/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;1/15/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want total counts per Name (if two dates are the same twice, count as twice) and then only 1 for actual (sum)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;NAME&lt;/TD&gt;&lt;TD&gt;TOTAL_COUNTS&lt;/TD&gt;&lt;TD&gt;ACTUAL_COUNTS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2222&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3333&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the nested loop but no luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;/P&gt;&lt;P&gt;select DISTINCT&lt;BR /&gt;a.NAME,&lt;BR /&gt;count(a.DATE) as Total_counts,&lt;BR /&gt;a.actual_counts&lt;BR /&gt;from (select distinct a.NAME,&lt;BR /&gt;count(a.actual) as actual_counts&lt;BR /&gt;from sql.p_IE_ELIGIBILITY a&lt;BR /&gt;where a.actual="1"&lt;BR /&gt;group by a.NAME)&lt;BR /&gt;group by a.NAME as a full join&lt;BR /&gt;(select distinct a.NAME, count(*) as total from TEST) as b&lt;BR /&gt;on a.NAME = b.NAME;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622453#M183102</guid>
      <dc:creator>monday89</dc:creator>
      <dc:date>2020-02-05T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622456#M183104</link>
      <description>&lt;P&gt;No looping is needed here. You don't have to write your own code to perform simple operations like counting. SAS has many many built-in procedures that will do what you want, which is counting. It would certainly be a good idea for you to familarize yourself with many of the basic procedures, such as PROC MEANS/PROC SUMMARY and PROC FREQ, as this will enable you to work a lot faster than writing your own looping code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SUMMARY solution&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
    class name;
    var actual;
    output out=want n=total_counts sum=actual_counts;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622456#M183104</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-05T14:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622457#M183105</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input Name	DATE :mmddyy10.	actual;
cards;
1111	1/2/2019	1
1111	1/2/2019	1
1111	1/4/2019	0
1111	1/5/2019	0
1111	1/6/2019	0
2222	1/4/2019	1
2222	1/5/2019	1
2222	1/6/2019	1
3333	1/6/2019	1
3333	1/10/2019	0
3333	1/10/2019	0
3333	1/13/2019	1
3333	1/14/2019	1
3333	1/15/2019	1
;

proc sql;
create table want as
select name,count(name) as TOTAL_COUNTS,sum(actual) as ACTUAL_COUNTS
from have
group by name;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622457#M183105</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-05T14:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622458#M183106</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Did you try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;

select DISTINCT
NAME,
count(DATE) as Total_counts,
sum(actual_counts) as actual_counts
from sql.p_IE_ELIGIBILITY&lt;BR /&gt;group by name;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I think it will be easier!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JD&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622458#M183106</guid>
      <dc:creator>JeanDo</dc:creator>
      <dc:date>2020-02-05T14:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622461#M183108</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do you mean something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input
Name : $ DATE : mmddyy.	actual
;
format date yymmdd10;
cards;
1111 1/2/2019 1
1111 1/2/2019 1
1111 1/4/2019 0
1111 1/5/2019 0
1111 1/6/2019 0
2222 1/4/2019 1
2222 1/5/2019 1
2222 1/6/2019 1
3333 1/6/2019 1
3333 1/10/2019 0
3333 1/10/2019 0
3333 1/13/2019 1
3333 1/14/2019 1
3333 1/15/2019 1
;
run;

proc sql;
select 
  name
, count(date) as TOTAL_COUNTS
, count(distinct case when actual = 1 then date else . end) as ACT_COUNTS
from 
have
group by name
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;output:&lt;/P&gt;&lt;PRE&gt;Name TOTAL_COUNTS ACT_COUNTS 
1111 5 1 
2222 3 3 
3333 6 4 &lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:30:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622461#M183108</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-02-05T14:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622463#M183109</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/303622"&gt;@monday89&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do it either through a proc means or a proc sql:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have noprint;
	var actual;
	class Name;
	ways 1;
	output out=want (drop =_type_ _freq_) n=TOTAL_COUNTS sum=ACTUAL_COUNTS;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table want as
	select name,
		   count(actual) as TOTAL_COUNTS,
		   sum(actual) as ACTUAL_COUNTS
	from have
	group by name;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture d’écran 2020-02-05 à 15.37.28.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35873iB0621644E01B1BA4/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-02-05 à 15.37.28.png" alt="Capture d’écran 2020-02-05 à 15.37.28.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622463#M183109</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-05T14:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622465#M183110</link>
      <description>&lt;P&gt;Allow me to offer some unsolicited advice, whose bottom line is &lt;EM&gt;&lt;STRONG&gt;learn to use the proc summary (identical to "proc means") solution offered by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&lt;/STRONG&gt;&lt;/EM&gt; .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sure SQL can be used to do this task, but analysis and tabulation of this sort are the raison d'etre of SAS.&amp;nbsp; In&amp;nbsp; particular proc summary/means can do lots of aggregation and many statistics that would require twisting yourself into knots when using SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SQL to solve many common (and not-so-common) tabulation tasks is like treating all problems as nails suitable for the SQL hammer.&amp;nbsp; Yes, it's a nice hammer, but the other tools are there for good reason.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622465#M183110</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-02-05T14:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622466#M183111</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Allow me to offer some unsolicited advice, whose bottom line is &lt;EM&gt;&lt;STRONG&gt;learn to use the proc summary (identical to "proc means") solution offered by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&lt;/STRONG&gt;&lt;/EM&gt; .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sure SQL can be used to do this task, but analysis and tabulation of this sort are the raison d'etre of SAS.&amp;nbsp; In&amp;nbsp; particular proc summary/means can do lots of aggregation and many statistics that would require twisting yourself into knots when using SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SQL to solve many common (and not-so-common) tabulation tasks is like treating all problems as nails suitable for the SQL hammer.&amp;nbsp; Yes, it's a nice hammer, but the other tools are there for good reason.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In addition, if you have a case where you need to slice the data two (or more) different ways — for example, slice the data by state to compute state-level statistics; and also slice the data by county to produce county level statistics — SQL requires two PROC SQL blocks and two passes through the data, while PROC SUMMARY requires one PROC SUMMARY block and one pass through the data. Not only that, but SUMMARY handles missing values and computes weighted statistics properly while SQL doesn't always do that; and SUMMARY has &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=p04vbvpcjg2vrjn1v8wyf0daypfi.htm&amp;amp;locale=en" target="_self"&gt;many built in statistics&lt;/A&gt; that I don't think SQL has built-in (although since I don't use SQL for this purpose, maybe I'm wrong, can SQL compute the 99th percentile statistic?).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622466#M183111</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-05T15:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622467#M183112</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/303622"&gt;@monday89&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you wrote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I want total counts per Name (if two dates are the same twice, count as twice) and then only 1 for actual (sum)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;in such case should the value of &lt;SPAN&gt;ACTUAL_COUNTS&amp;nbsp;&lt;/SPAN&gt;for 1111 be 2? since the first date (&lt;SPAN&gt;1/2/2019&lt;/SPAN&gt;) is doubled shouldn't it be 1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:00:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622467#M183112</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-02-05T15:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622475#M183115</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp; I like your diligence and wasn't sure of that part too. The WANT shown by OP seems to suggest a straight forward GROUP BY sum/count respectively.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622475#M183115</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-05T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622477#M183116</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That line of "specification" was the reason why I went into:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;count(distinct case when actual = 1 then date else . end) as ACT_COUNTS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;instead classic aggregation procedure like summary/means or tabulate. Lack of handling "twisted" aggregation logic is the reason why sometimes SQL "outperforms" good classic procedures. I wish I could use something like `variable * n(distinct)` in tabulate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622477#M183116</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-02-05T15:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622479#M183117</link>
      <description>&lt;P&gt;Fully agree. I might place my bet on your understanding to be the right comprehension of the requirement. After all, looking at OP's use of SQL syntax, it appears OP does seems know SQL and may not be the straight forward summary stat assumption of mine and others. Hmm time for a coffee break? Oh rather a corona beer to beat the corona virus. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622479#M183117</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-05T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622480#M183118</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the SAS 9.4M6 doc this are SQL's aggregation functions:&lt;/P&gt;&lt;DIV class="xis-topic"&gt;&lt;DIV class="xis-subTopic"&gt;&lt;DIV class="xis-topicContent"&gt;&lt;DIV class="xis-table"&gt;FunctionDefinition &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;AVG, MEAN&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;mean or average of values&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;COUNT, FREQ, N&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;number of nonmissing values&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;CSS&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;corrected sum of squares&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;CV&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;coefficient of variation (percent)&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;MAX&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;largest value&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;MIN&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;smallest value&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;NMISS&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;number of missing values&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;PRT&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;probability of a greater absolute value of Student's &lt;CODE class="xis-codeVarValue"&gt;t&lt;/CODE&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;RANGE&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;range of values&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;STD&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;standard deviation&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;STDERR&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;standard error of the mean&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;SUM&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;sum of values&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;SUMWGT&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;sum of the WEIGHT variable values&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;T&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;Student's &lt;CODE class="xis-codeVarValue"&gt;t&lt;/CODE&gt; value for testing the hypothesis that the population mean is zero&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;USS&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;uncorrected sum of squares&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;VAR&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;variance&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;so no quantiles &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622480#M183118</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-02-05T15:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: nested loops sql or dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622481#M183119</link>
      <description>&lt;P&gt;The function MEDIAN() works in SQL, but not P99 and not MODE. Also, PROC SUMMARY contains ability to compute confidence intervals and t-statistics and their probability.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nested-loops-sql-or-dataset/m-p/622481#M183119</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-05T15:47:22Z</dc:date>
    </item>
  </channel>
</rss>

