query chapter