<?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: How to sum and then find max in sql in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384564#M3189</link>
    <description>&lt;P&gt;What nested SQL?&lt;/P&gt;
&lt;P&gt;I can see off the bat that where should be having.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2017 12:09:40 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-08-01T12:09:40Z</dc:date>
    <item>
      <title>How to sum and then find max in sql</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384563#M3188</link>
      <description>&lt;P&gt;I need to sum the hits of each player and then show the max one. This is my code, but I has syntax problem on this nested sql, can someone help to figure out?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
title2"Part 2d";
select distinct PlayerID, min(YearID) label="First Year", sum(H) as Total_Hits
   group by PlayerID
   where Total_Hits=max(Total_Hits);
quit;
title;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 11:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384563#M3188</guid>
      <dc:creator>ydu180</dc:creator>
      <dc:date>2017-08-01T11:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum and then find max in sql</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384564#M3189</link>
      <description>&lt;P&gt;What nested SQL?&lt;/P&gt;
&lt;P&gt;I can see off the bat that where should be having.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 12:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384564#M3189</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-08-01T12:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum and then find max in sql</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384566#M3190</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select *
 from (
select sex,sum(height) as total
 from sashelp.class
  group by sex
)
   having  total=max( total);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 12:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-sum-and-then-find-max-in-sql/m-p/384566#M3190</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-08-01T12:14:08Z</dc:date>
    </item>
  </channel>
</rss>

