All queries with JOIN should use `sql_build_query()` from the db object