Sunday, 4 March 2018

arcgis desktop - How to use the SQL in select by attribute to select the entries for each values in certain field?


I am trying to use select by attribute for the table in ArcGIS, which is similar to the following picture (lets say):


enter image description here



I want to select those entries for each A and B, which have maximum count.


I used


SELECT * 
FROM table
WHERE
count=
(
SELECT DISTINCT MAX(count)
FROM table
)


This can give result for the maximum count of the whole table. What should be the modification or addition in the above query so that it will select the maximum count for A and B as well?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...