GDAL supports executing SQL statements against a datasource. For most file
formats (e.g. Shapefiles, GeoJSON, FlatGeobuf files), the built-in OGR SQL
dialect will be used by default. It is also possible to request the
alternate "SQLite"
dialect, which will use the SQLite engine to evaluate
commands on GDAL datasets. This assumes that GDAL is built with support for
SQLite, and preferably with Spatialite support too to benefit from spatial
functions.