AliRelVal: fixed JOIN query