Add script to generate query patterns