wrapper where query build