<?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 Unable to make complex queries with .NET SDK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293386#M9866</link>
    <description>&lt;P&gt;Hello everyone !&lt;/P&gt;&lt;P&gt;I'm working on an ArcGIS Pro add-in and I need to make SQL queries using keywords "SELECT COUNT(field)", "GROUP BY" and "HAVING".&lt;BR /&gt;At the moment, I use 2 methods to execute queries :&lt;BR /&gt;- Geodatabase.Evaluate(QueryDef)&lt;BR /&gt;- FeatureLayer.Search(QueryFilter)&lt;BR /&gt;For QueryDef and QueryFilter we have to set a Subfields property to get the columns, but we can't use the COUNT keyword.&lt;BR /&gt;I also tried to add a "GROUP BY" in the PostfixClause property but it doesn't work either...&lt;/P&gt;&lt;P&gt;So I would like to know if it is possible to do that, and if yes, how, or if there is a workaround to do that&lt;/P&gt;&lt;P&gt;Thank you for your advices.&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 08:16:23 GMT</pubDate>
    <dc:creator>AntoineKlein</dc:creator>
    <dc:date>2023-05-26T08:16:23Z</dc:date>
    <item>
      <title>Unable to make complex queries with .NET SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293386#M9866</link>
      <description>&lt;P&gt;Hello everyone !&lt;/P&gt;&lt;P&gt;I'm working on an ArcGIS Pro add-in and I need to make SQL queries using keywords "SELECT COUNT(field)", "GROUP BY" and "HAVING".&lt;BR /&gt;At the moment, I use 2 methods to execute queries :&lt;BR /&gt;- Geodatabase.Evaluate(QueryDef)&lt;BR /&gt;- FeatureLayer.Search(QueryFilter)&lt;BR /&gt;For QueryDef and QueryFilter we have to set a Subfields property to get the columns, but we can't use the COUNT keyword.&lt;BR /&gt;I also tried to add a "GROUP BY" in the PostfixClause property but it doesn't work either...&lt;/P&gt;&lt;P&gt;So I would like to know if it is possible to do that, and if yes, how, or if there is a workaround to do that&lt;/P&gt;&lt;P&gt;Thank you for your advices.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 08:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293386#M9866</guid>
      <dc:creator>AntoineKlein</dc:creator>
      <dc:date>2023-05-26T08:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to make complex queries with .NET SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293451#M9867</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For count you can use method&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic17396.html" target="_blank"&gt;GetCount(QueryFilter) Method—ArcGIS Pro&lt;/A&gt;&amp;nbsp;from table or featureclass.&lt;/P&gt;&lt;P&gt;For records grouping I would suggest you look at the&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic20013.html" target="_blank"&gt;GroupBy Property (TableStatisticsDescription)—ArcGIS Pro&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 13:47:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293451#M9867</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-05-26T13:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to make complex queries with .NET SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293478#M9868</link>
      <description>&lt;P&gt;Thanks for your answer, can I use these methods together ?&lt;/P&gt;&lt;P&gt;I would like to execute a query like this :&lt;/P&gt;&lt;LI-CODE lang="sql"&gt; SELECT count(node.idnode) AS nbr_elements, node.idnode
   FROM node
  GROUP BY node.idnode
 HAVING count(node.idnode) &amp;gt; 1;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I'll try it.&lt;/P&gt;&lt;P&gt;I had another idea to this, but I'm not sure either, I thought to use a database view instead of, but I don't know if it is possible to query a view from ArcGIS PRO, is it ?&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 14:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293478#M9868</guid>
      <dc:creator>AntoineKlein</dc:creator>
      <dc:date>2023-05-26T14:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to make complex queries with .NET SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293496#M9869</link>
      <description>&lt;P&gt;Antoine,&lt;/P&gt;&lt;P&gt;I think you can do everything but the HAVING clause using the table statistics methods described &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Geodatabase#calculating-statistics" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 15:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1293496#M9869</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2023-05-26T15:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to make complex queries with .NET SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1294387#M9893</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your help, finally I used database view to do this, it will be easier in our project context, but I'll probably need this later.&lt;/P&gt;&lt;P&gt;Have a nice day !&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 08:05:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/unable-to-make-complex-queries-with-net-sdk/m-p/1294387#M9893</guid>
      <dc:creator>AntoineKlein</dc:creator>
      <dc:date>2023-05-31T08:05:56Z</dc:date>
    </item>
  </channel>
</rss>

