Re-enable SQLite query tests

The issue was caused by double prefixing and non-prefixing of inner joints
during the `select` by MW's DB interface.