pavsanto

Use GROUP BY in SelectLayerByAttribute  where_clause ??

Discussion created by pavsanto on Aug 22, 2013
Latest reply on Aug 27, 2013 by rfairhur24
Hi,
I am developing a stand alone C# Map control application using ArcGIS Engine 10.1. I am trying to select features in a point feature class using "SelectLayerByAttribute" class which requires me to use to use GROUP BY keyword.. The Query goes something like this..

SELECT LONGITUDE, LATITUDE, COUNT(LONGITUDE) FROM LAYER123 GROUP BY LONGITUDE,LATITUDE, COUNT(LONGITUDE) HAVING COUNT(LONGITUDE) > 5;

The idea is to select all the features that have been plotted more than 5 times for a given longitude and latitude. My problem here is that I am unable to execute the above query in SelectLayerByAttribute.where_clause, is there a way that i can execute GROUP BY statements to select features in a given layer. Also let me know if there is a workaround for this..

Thanks and Regards,
Santosh Pavan Kumar N

Outcomes