<?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 arcgis.features.Table.query Inputs in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-features-table-query-inputs/m-p/60865#M4873</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to return the maximum value from a field in a table, or better yet the maximum value for the field when grouped on another field. I know how to write the SQL for this, but&amp;nbsp;I'm fairly new to ArcGIS, and&amp;nbsp;I'm at a loss on how to translate this&amp;nbsp;into the input parameters for the query() function. It looks like I need to use the parameters 'group_by_fields_for_statistics' and 'out_statistics', but I can't find&amp;nbsp;&lt;EM&gt;any&lt;/EM&gt; examples on what these should actually look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The API reference is not much help; for out_statistics, it says,&amp;nbsp;"The definitions for one or more field-based&amp;nbsp;statistics to be calculated."&amp;nbsp;Does that mean a string with a sql function ("MAX" or&amp;nbsp;"MAX()" or "MAX(fieldname)" or...?), a function definition, a predefined list of functions somewhere that I&amp;nbsp;need to invoke, or something else entirely?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This isn't the first time I've run into this kind of issue with arcgis (that is, finding that an input parameter is available but&amp;nbsp;being unable to find any guidance on how to use it), so if there's a good reference or resource for this that I'm just missing, I'd be very glad to hear about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Feb 2018 01:31:26 GMT</pubDate>
    <dc:creator>Abbey_Roelofs</dc:creator>
    <dc:date>2018-02-20T01:31:26Z</dc:date>
    <item>
      <title>arcgis.features.Table.query Inputs</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-features-table-query-inputs/m-p/60865#M4873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to return the maximum value from a field in a table, or better yet the maximum value for the field when grouped on another field. I know how to write the SQL for this, but&amp;nbsp;I'm fairly new to ArcGIS, and&amp;nbsp;I'm at a loss on how to translate this&amp;nbsp;into the input parameters for the query() function. It looks like I need to use the parameters 'group_by_fields_for_statistics' and 'out_statistics', but I can't find&amp;nbsp;&lt;EM&gt;any&lt;/EM&gt; examples on what these should actually look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The API reference is not much help; for out_statistics, it says,&amp;nbsp;"The definitions for one or more field-based&amp;nbsp;statistics to be calculated."&amp;nbsp;Does that mean a string with a sql function ("MAX" or&amp;nbsp;"MAX()" or "MAX(fieldname)" or...?), a function definition, a predefined list of functions somewhere that I&amp;nbsp;need to invoke, or something else entirely?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This isn't the first time I've run into this kind of issue with arcgis (that is, finding that an input parameter is available but&amp;nbsp;being unable to find any guidance on how to use it), so if there's a good reference or resource for this that I'm just missing, I'd be very glad to hear about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 01:31:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-features-table-query-inputs/m-p/60865#M4873</guid>
      <dc:creator>Abbey_Roelofs</dc:creator>
      <dc:date>2018-02-20T01:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: arcgis.features.Table.query Inputs</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-features-table-query-inputs/m-p/60866#M4874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Python group is older and generally for ArcPy questions.&amp;nbsp; I am sharing with the &lt;A href="https://community.esri.com/group/4814"&gt;ArcGIS API for Python&lt;/A&gt;‌ group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Overall, the ArcGIS API for Python is a Python wrapper for ArcGIS REST API.&amp;nbsp; That said, they do continue to add unique functionality outside of the REST API.&amp;nbsp; For understanding more about the query syntax, see &lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/query-map-service-layer-.htm" title="https://developers.arcgis.com/rest/services-reference/query-map-service-layer-.htm"&gt;Query (Map Service\Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you are looking for is how to call &lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/summarize-attributes.htm" title="https://developers.arcgis.com/rest/services-reference/summarize-attributes.htm"&gt;Summarize Attributes—ArcGIS REST API: Services Directory | ArcGIS for Developers&lt;/A&gt; using the ArcGIS API for Python.&amp;nbsp; Right off the top, I am not sure, I will have to dig into the Python documentation more and get back with you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 14:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-features-table-query-inputs/m-p/60866#M4874</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-02-20T14:32:02Z</dc:date>
    </item>
  </channel>
</rss>

