Get statistic for JQL: status was "in progress" during ("2024/07/01", "2024/07/05")

Hello! How can I build statistics that will show the number of tickets was in the “In Progress” status broken down by week? Please note that we need statistics not on status transitions, but on being in the status. Example.
There are three tickets:

  • “ticket A” was transferred to the “In Progress” status on 20/06/2024
  • “ticket B” was transferred to the “In Progress” status on 02/07/2024 and at the same day was transferred to “Closed” status
  • “ticket A” was transferred to the “In Progress” status on 25/06/2024 and then to “Closed” on 04/07/2024

In the statistics for the period from July 1 to 5, we should receive all three tickets A, B, C, since they were all in the “In progress” status during the specified period. This statistic matches JQL: “status WAS “in progress” DURING (“2024/07/01”, “2024/07/05”)”