Reputation: 158
I'm attempting to query a feature service using a nested WHERE clause. I'm trying to return the record with the highest OBJECTID count, but I'm not sure how to really adapt this to the REST query. On a feature class i would expect the WHERE clause to look something like;
SELECT MAX("OBJECTID") FROM (feature class name)
How would one go about adapting this expression to the REST query form for the WHERE clause? Thanks.
Upvotes: 0
Views: 426
Reputation: 331
You can set the output statistics value to return this (leave the where clause blank).
[{"statisticType":"max","onStatisticField":"OBJECTID", "outStatisticFieldName":"maxobjectid"}]
Upvotes: 1