getCallRate SQL function query fixed