M/insert by query analysis

grammar