<?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: Selecting max value in SQL query  by group in ARCMAP in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162909#M3645</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Just to confirm, your values in the above table are left-indented, suggesting text.&amp;nbsp; Are your values text or numeric values.&amp;nbsp; Numeric values usually displayed w/ right-indent.&lt;/P&gt;&lt;P&gt;Regarding your sql, maybe change your sql from:&lt;/P&gt;&lt;P&gt;VALUE in (SELECT max(VALUE) FROM&amp;nbsp;featureClass GROUP BY ID)&lt;/P&gt;&lt;P&gt;To&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;[Value] IN (SELECT MAX( [Value] ) FROM featureClass GROUP BY [ID] ).&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Jeff&lt;/P&gt;</description>
    <pubDate>Sun, 10 Apr 2022 23:56:36 GMT</pubDate>
    <dc:creator>JeffHouser</dc:creator>
    <dc:date>2022-04-10T23:56:36Z</dc:date>
    <item>
      <title>Selecting max value in SQL query  by group in ARCMAP</title>
      <link>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162901#M3644</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;SPAN&gt;I am working with a feature class stored in a File Geodatabase In ArcGIS 10, .&amp;nbsp;I want select the maximum value by ID like&amp;nbsp;the example below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried the following sql query but without result :&amp;nbsp; VALUE in (SELECT max(VALUE) FROM&amp;nbsp;featureClass GROUP BY ID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I solve?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;ID&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;VALUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;20&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 22:17:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162901#M3644</guid>
      <dc:creator>khalidechlouchi</dc:creator>
      <dc:date>2022-04-10T22:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting max value in SQL query  by group in ARCMAP</title>
      <link>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162909#M3645</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Just to confirm, your values in the above table are left-indented, suggesting text.&amp;nbsp; Are your values text or numeric values.&amp;nbsp; Numeric values usually displayed w/ right-indent.&lt;/P&gt;&lt;P&gt;Regarding your sql, maybe change your sql from:&lt;/P&gt;&lt;P&gt;VALUE in (SELECT max(VALUE) FROM&amp;nbsp;featureClass GROUP BY ID)&lt;/P&gt;&lt;P&gt;To&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;[Value] IN (SELECT MAX( [Value] ) FROM featureClass GROUP BY [ID] ).&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Jeff&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 23:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162909#M3645</guid>
      <dc:creator>JeffHouser</dc:creator>
      <dc:date>2022-04-10T23:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting max value in SQL query  by group in ARCMAP</title>
      <link>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162911#M3646</link>
      <description>&lt;P&gt;I don't believe File GeoDatabases support GROUP BY when selecting rows in a table? A quick search of this forum and GIS SE and you see many threads about the issue.&lt;/P&gt;&lt;P&gt;If you want to &lt;EM&gt;create&lt;/EM&gt; a table of just that data (which is different to &lt;EM&gt;selecting&lt;/EM&gt; rows) then you can use the summary statistics tool as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_0-1649635467306.png" style="width: 273px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38535i95B379B6EB33D336/image-dimensions/273x430?v=v2" width="273" height="430" role="button" title="DuncanHornby_0-1649635467306.png" alt="DuncanHornby_0-1649635467306.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 00:05:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162911#M3646</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2022-04-11T00:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting max value in SQL query  by group in ARCMAP</title>
      <link>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162916#M3647</link>
      <description>&lt;P&gt;Thank you for your feedback, the values are all numeric, I tried your solution, but it didn't work.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 01:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162916#M3647</guid>
      <dc:creator>khalidechlouchi</dc:creator>
      <dc:date>2022-04-11T01:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting max value in SQL query  by group in ARCMAP</title>
      <link>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162917#M3648</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;DuncanHornby,&amp;nbsp; you are right, GROUP BY is not supported in geodatabases file and shape files, I think I will try to do it on personal geodatabase with ACCESS.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 01:30:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/selecting-max-value-in-sql-query-by-group-in/m-p/1162917#M3648</guid>
      <dc:creator>khalidechlouchi</dc:creator>
      <dc:date>2022-04-11T01:30:53Z</dc:date>
    </item>
  </channel>
</rss>

