Test for conditional queries