Move query definition to the recipe so it can be overridden.