Completed query builder