Update test with proper function call
(#198) - Use distinct in join clause