I have encountered the above error in my Rpi 3B+ nightly-20221205-ae18370 LibreELEC Kodi setup, used mostly for music. I reported it on the Kodi forum, in this thread
SQL: [MyMusic82.db] SQLite error SQLITE_ERROR (a JOIN clause is required before ON)
and it was suggested it might be polite to mention it here.