AnsweredAssumed Answered

Query to select MIN and MAX values by groups

Question asked by geonetadmin on Jun 24, 2014
Latest reply on Jun 25, 2014 by jskinner-esristaff
Original User: AntonioH

In ArcMap 10 i'm working in a Personal Geodatabase where the points (see screenshot below) represent the number of each house in the street. Each point has an ObjectID. This ObjectID is an unique value for each "link" of the street to which all the points are related.

[ATTACH=CONFIG]34858[/ATTACH]

I have a total of 35,000 points (house numbers), which are all related to 14,000 different links. What I want is to select both the MAX and MIN value in each side of the street. Each side of the street also has a unique ID, which appears in my attribute table as CVEFT. On every link, the CVEFT (for both sides) is different.

This is what my Table looks like:

[ATTACH=CONFIG]34859[/ATTACH]

As you can see in the screenshot above, there are several points (NUMEXT) related to the same link (OBJECTID). You can also see that all the points related to a single link may have 2 different street-side codes (CVEFT).

I want to build a SQL query that allows me to select the MIN and MAX values for every Link, for each side of the street.

Does anyone have any idea of how to do this? Any ideas would be appreciated! Thanks!

Attachments

Outcomes