filter by query interval