SQLite Forum

Nearest-match join
Login
Using window functions, it seems to materialize the view. Apart from that it's efficient.