COCO
COCO

Reputation: 158

Writing Nested WHERE clause in ArcGIS Rest API Feature Service

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

Answers (1)

Dave Timmins
Dave Timmins

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

Related Questions