create simple query-ctx and query-reduce