How do I state the SQL querry to select points by atributes by max value and 20% lower?
I have the Shapefile in a geodatabase.
I'm going to create a workflow in Model builder later but I need to prove that this analasys corresponds to the realworld manualy first. So if thers anything special to do to use the same function in model builder I would like to know that too.
Arcgis 10.4. - spatial analasys, 3D, ++ extention pack.
I'm constructing an analasys workflow that indicates separate trees and corresponding hight to each tree.
Solved! Go to Solution.
You can use a subquery:
GRID_CODE >= ( (SELECT MAX( GRID_CODE ) FROM new_shapefile3) * 0.8)
This will return all the values that are larger than 80% of the max, so the top 20%.
You can use a subquery:
GRID_CODE >= ( (SELECT MAX( GRID_CODE ) FROM new_shapefile3) * 0.8)
This will return all the values that are larger than 80% of the max, so the top 20%.
Thats works fine if I have exported the shapefile to a database, but if I have a created feture class indide a database the same querry selects everything, What I'm I doing wrong here?
Well.... I dont see what I'm doing wrong here.... with this code I just selects everything...
gridcode >= ((SELECT MAX( GRIDCODE ) FROM PEAK_LO_111) ) *0.8
The caps of the field name in the statement needs to be consistent eg SELECT MAX(gridcode)