I am attempting to find the most date for each occurrence in a given county. I am attempting to do so with a SQL expression, but every time I add a GROUP BY clause ArcGIS crashes (I am doing the work in Pro, but tested the same thing in ArcMap, and both crash immediately when attempting to run or verify an expression with GROUP BY)
SELECT * FROM [Table] WHERE is implied, so my code reads:
ALARM_DATE =
(SELECT MAX(ALARM_DATE)
FROM
CountyOccurrences_firep18_1_A_1000acres)
GROUP BY
COUNTY_NAME
Everything up to GROUP BY is valid, but of course it only returns the most recent date in the whole table. Whenever I add GROUP BY to organize by COUNTY_NAME, even if just verifying the expression, the software crashes immediately.
The data is stored in a local .gdb, and I have attempted it on the feature class as well as an exported stand-alone table.
I am looking for a workaround to achieve the objective of selecting the most recent occurrence by county.
group by
should be legal when used in a query layer ... have you tried that?