SQL Code to query most recent data for a point

375
0
06-12-2022 01:04 PM
LindsayDupont
New Contributor

Hello Esri Family,

I'm trying to write a definition query for a layer in my data so that if one point has multiple years of data, only the most recent year is displayed. I wrote the SQL query attached in order to tediously make a series of 'Or' statements in the definition query, but all those will need to be updated the next time data is collected.

I want "year >= Most_Recent_Year" but am not sure how to make that happen in the SQL query box.

If you have a reference or advice I'd appreciate it! Please & thank you.

0 Kudos
0 Replies