two join conditions for the price of one