Interesting, but possible in Pascal?
As Thaddy already wrote, yes
For an example see FreePascal package fcl-db/examples/sqlite3extdemo.pp (and accompanied myext.pp)
Yes, I know, but unfortunately the original SQLITE file is 4.5GB.
Ah, the final requirements/conditions. It took only #210 posts

As rvk already wrote, a vital piece if information that should have been mentioned from the start imho. Even in case you are not able to share (all) the data. It just makes it a bit more difficult to verify (at least in my case, since i'm fairly new to SQLite).