createQueryReducer

Creates a QueryReducer function.