What is the best way to query count of all and with condition by window?

The data has a boolean tag and a field like

{
  "_time": <timestamp>,
  "fields": {
    "id": <string>
  },
  "tags": {
    "condition": <boolean>
  }
}

I want to get a result like the below.
(window: 1d)

[
  {
    "_time": "2021-09-28",
    "fields": {
      "count_of_all": 10,
      "count_with_coundition": 7
    }
  },
  {
    "_time": "2021-09-29",
    "fields": {
      "count_of_all": 12,
      "count_with_coundition": 8
    }
  },
  ...
]

Can I get a count of all and count with condition in one query?

Now I’m doing that like this.

all =
  from(bucket: <bucket>)
  |> range(start: <start>, stop: <stop>)
  |> drop(columns: ["condition"])
  |> aggregateWindow(every: 1d, fn: count, createEmpty: true)

condition =
  from(bucket: <bucket>)
  |> range(start: <start>, stop: <stop>)
  |> filter(fn: (r) => r.condition == true)
  |> aggregateWindow(every: 1d, fn: count, createEmpty: true)