Could FGDB SQL be enhanced to support correlated subqueries?
Example: Using an SQL expression in the Select by Attributes tool, I want to select the greatest 1 per group.
NOT EXISTS (
SELECT *
FROM road_insp r2
WHERE r2.asset_id = road_insp.asset_id AND r2.date_ > road_insp.date_
)
--Demo: https://dbfiddle.uk/gSGjLTCW The above SQL expression would work as expected in mobile GDBs and enterprise GDBs. But in file GDBs, it would select all rows in the table, which would be incorrect.
It’s important to note that the query fails silently, producing incorrect results, rather than throwing an useful error.
Related: Clarify the docs: Correlated subqueries not supported in FGDB SQL expressions
Could FGDB SQL be enhanced to support correlated subqueries?
Thanks.