test if query is ran