Return real query form reference query,no test.