Override joins

It will eliminate error: INNER JOIN': Error: ... is already defined during creating a sql query.

Scenario:
We have a sorting feature on the page which allows users to order by a most reviewed/customer rating, on the same time we might have a filter by an average rating.