tst: query base