minimally viable query insert command

also fixed silly lets in query replace