If the ATTACH function is activated in the build of Sqlite (it should be in most builds), then you can attach another database file to the current connection using the ATTACH keyword.
The limit on the number of db's that can be attached is a compile-time setting (SQLITE_MAX_ATTACHED), currently defaults to 10, but this too may vary by the build you have. The global limit is 125.
attach 'database1.db' as db1;
attach 'database2.db' as db2;
You can use the below code to see all connected databases with keyword
Now, you will be able to do the following:
db2.SomeTable b on b.SomeColumn = a.SomeColumn;
Note: Here, "[t]he database names main and temp are reserved for the primary database and database to hold temporary tables and other temporary data objects. Both of these database names exist for every database connection and should not be used for attachment".