Find query type