<?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>idea FGDB SQL — Multiple columns on the left-hand side of the IN operator in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-multiple-columns-on-the-left-hand-side-of/idi-p/1371168</link>
    <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.2.1; file geodatabase&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In a mobile geodatabase (and Oracle and Postgres), I can use a SQL expression in Select By Attributes like this:&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;(t_species, t_date)&lt;/STRONG&gt;&lt;/FONT&gt; IN (
  SELECT 
    t_species, 
    max(t_date) 
  FROM 
    species_records 
  GROUP BY 
    t_species
)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1705518319206.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91860iDE998EE26FB2C4F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1705518319206.png" alt="Bud_0-1705518319206.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's a simple and efficient way to select the greatest 1 per group (with ties).&lt;/P&gt;&lt;P&gt;That technique can be described as: "using a row value (multiple columns) on the left-hand side of the IN operator".&lt;/P&gt;&lt;P&gt;Could FGDB SQL be enhanced to support that syntax?&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/geodatabase-questions/select-maximum-values-in-select-by-attributes/m-p/1370019/highlight/true#M8774" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/geodatabase-questions/select-maximum-values-in-select-by-attributes/m-p/1370019/highlight/true#M8774&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2024 19:49:35 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-04-04T19:49:35Z</dc:date>
    <item>
      <title>FGDB SQL — Multiple columns on the left-hand side of the IN operator</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-multiple-columns-on-the-left-hand-side-of/idi-p/1371168</link>
      <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.2.1; file geodatabase&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In a mobile geodatabase (and Oracle and Postgres), I can use a SQL expression in Select By Attributes like this:&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;(t_species, t_date)&lt;/STRONG&gt;&lt;/FONT&gt; IN (
  SELECT 
    t_species, 
    max(t_date) 
  FROM 
    species_records 
  GROUP BY 
    t_species
)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1705518319206.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91860iDE998EE26FB2C4F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1705518319206.png" alt="Bud_0-1705518319206.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's a simple and efficient way to select the greatest 1 per group (with ties).&lt;/P&gt;&lt;P&gt;That technique can be described as: "using a row value (multiple columns) on the left-hand side of the IN operator".&lt;/P&gt;&lt;P&gt;Could FGDB SQL be enhanced to support that syntax?&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/geodatabase-questions/select-maximum-values-in-select-by-attributes/m-p/1370019/highlight/true#M8774" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/geodatabase-questions/select-maximum-values-in-select-by-attributes/m-p/1370019/highlight/true#M8774&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 19:49:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-multiple-columns-on-the-left-hand-side-of/idi-p/1371168</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-04-04T19:49:35Z</dc:date>
    </item>
  </channel>
</rss>

