<?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: GP tool to select greatest n per group in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1238363#M63053</link>
    <description>&lt;P&gt;I know you mentioned you're using a fGDB but if you were using an enterprise gdb (egdb), then you could use SQL to do this.&lt;/P&gt;&lt;P&gt;There's an article &lt;A href="https://support.esri.com/en/technical-article/000008936" target="_self"&gt;here&lt;/A&gt; that explains the syntax to use -&amp;nbsp;&amp;lt;date&amp;gt; = (SELECT MAX(date) FROM &amp;lt;table_name&amp;gt; GROUP BY &amp;lt;group_ID&amp;gt;)&lt;/P&gt;&lt;P&gt;The article does say if you create an OLE DB connection to a MS Access table then you could use the SQL syntax above.&lt;/P&gt;&lt;P&gt;Looking for a fGDB solution right now.&lt;/P&gt;&lt;P&gt;UPDATE:&amp;nbsp; It seems with Python you can do this - here's a link &lt;A href="https://gis.stackexchange.com/questions/334218/definition-queries-for-most-recent-date-in-arcgis-pro" target="_self"&gt;here&lt;/A&gt; that shows a labeling example.&amp;nbsp; I'm not a Python person but I suspect many on this forum are.&lt;/P&gt;&lt;P&gt;UPDATE 2:&amp;nbsp; For fGDB data, use the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/dissolve.htm#GUID-2CB08A0F-8D9A-43CB-940F-9BBF544B1FA3" target="_self"&gt;Dissolve&lt;/A&gt; GP tool with the Maximum value set for the Statistics Field Parameter.&amp;nbsp; That should work for you BUT it does create a new FC unfortunately.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2022 16:53:26 GMT</pubDate>
    <dc:creator>Robert_LeClair</dc:creator>
    <dc:date>2022-12-06T16:53:26Z</dc:date>
    <item>
      <title>GP tool to select greatest 1 per group</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1238328#M63047</link>
      <description>&lt;P&gt;Is there an OOTB geoprocessing tool that can be used to select the &lt;EM&gt;greatest 1 per group&lt;/EM&gt; in a FGDB table?&lt;/P&gt;&lt;P&gt;For example, for a given ASSET_ID, select the road inspection that has the latest date.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1670342876793.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/57766i9B365EBE1277FEC4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1670342876793.png" alt="Bud_0-1670342876793.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Related:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://gis.stackexchange.com/questions/446891/file-geodatabase-sql-expression-to-get-greatest-n-per-group" target="_self"&gt;File Geodatabase SQL expression to get greatest 1 per group&lt;/A&gt; [ERROR 000358: Invalid expression]&lt;/LI&gt;&lt;LI&gt;Idea:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/geoprocessing-tool-to-select-greatest-n-per-group/idi-p/1239571/jump-to/first-unread-message" target="_self"&gt;Geoprocessing tool to select greatest 1 per group (without creating a new FC)&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/selecting-the-most-recent-records-based-on-unique/m-p/1369899/highlight/true#M77380" target="_self"&gt;Selecting the most recent records based on unique values in another field&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 07:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1238328#M63047</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-15T07:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: GP tool to select greatest n per group</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1238363#M63053</link>
      <description>&lt;P&gt;I know you mentioned you're using a fGDB but if you were using an enterprise gdb (egdb), then you could use SQL to do this.&lt;/P&gt;&lt;P&gt;There's an article &lt;A href="https://support.esri.com/en/technical-article/000008936" target="_self"&gt;here&lt;/A&gt; that explains the syntax to use -&amp;nbsp;&amp;lt;date&amp;gt; = (SELECT MAX(date) FROM &amp;lt;table_name&amp;gt; GROUP BY &amp;lt;group_ID&amp;gt;)&lt;/P&gt;&lt;P&gt;The article does say if you create an OLE DB connection to a MS Access table then you could use the SQL syntax above.&lt;/P&gt;&lt;P&gt;Looking for a fGDB solution right now.&lt;/P&gt;&lt;P&gt;UPDATE:&amp;nbsp; It seems with Python you can do this - here's a link &lt;A href="https://gis.stackexchange.com/questions/334218/definition-queries-for-most-recent-date-in-arcgis-pro" target="_self"&gt;here&lt;/A&gt; that shows a labeling example.&amp;nbsp; I'm not a Python person but I suspect many on this forum are.&lt;/P&gt;&lt;P&gt;UPDATE 2:&amp;nbsp; For fGDB data, use the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/dissolve.htm#GUID-2CB08A0F-8D9A-43CB-940F-9BBF544B1FA3" target="_self"&gt;Dissolve&lt;/A&gt; GP tool with the Maximum value set for the Statistics Field Parameter.&amp;nbsp; That should work for you BUT it does create a new FC unfortunately.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 16:53:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1238363#M63053</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2022-12-06T16:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: GP tool to select greatest n per group</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1369985#M77389</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;There's an article&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.esri.com/en/technical-article/000008936" target="_self" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;that explains the syntax to use -&amp;nbsp;&amp;lt;date&amp;gt; = (SELECT MAX(date) FROM &amp;lt;table_name&amp;gt; GROUP BY &amp;lt;group_ID&amp;gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;FYI - The SQL syntax in that article appears to be incorrect:&amp;nbsp;&lt;A href="https://community.esri.com/t5/geodatabase-questions/select-maximum-values-in-select-by-attributes/m-p/1369377" target="_self"&gt;Select maximum values in Select By Attributes (greatest n per group)&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, for my notes, the Dissolve tool doesn't seem to work for standalone tables. But the Summary Statistics tool does.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 08:47:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/gp-tool-to-select-greatest-1-per-group/m-p/1369985#M77389</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-21T08:47:26Z</dc:date>
    </item>
  </channel>
</rss>

