copy wiki post on defining and exec queries