[GIS] Select by attributes – records with the largest attribute value

sql

Using 'Select By Attributes' how can I select records from a shapefile database table where a numeric field contains the largest value.
Need to use MAX function or something like that but can't get the syntax right.

Best Answer

Try:

SELECT * FROM table
WHERE numfield=(SELECT DISTINCT MAX(numfield) FROM table)

enter image description here