query begin