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 I'm fairly new to ArcGIS, and I'm at a loss on how to translate this 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 any examples on what these should actually look like.
The API reference is not much help; for out_statistics, it says, "The definitions for one or more field-based statistics to be calculated." Does that mean a string with a sql function ("MAX" or "MAX()" or "MAX(fieldname)" or...?), a function definition, a predefined list of functions somewhere that I need to invoke, or something else entirely?
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 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.