build Query