add-function-for-join-where