M/insert by query analysis

is this a validation? would be nice to extract this method, since this is duplicate code and it would describe the intent