Query config

Sort inputs before outputs