Add some more tests for `frequency` queries