DuckDB is likely much better-suited than sqlite3 for the task at hand. Let's see if it can provide the same needs:
- a way to run the query (this is obviously easy)
- a way to get info about the query, such as an execution plan that alludes to the source tables