Duplicate weedout https://mariadb.com/kb/en/duplicateweedout-strategy/+image/duplicate-weedout-inner-join