Bulk nearest neighbor using lateral joins

How to use Postgres LATERAL keyword to allow to find the nearest geometry from one dataset comparing it to another. You can compare LATERAL to the SQL counterpart of other languages for loop.

Visit the resource