Using timestamp How to compare current data to data before 24 hours

I use elasticsearch as the data source.

query A and query B use the same elasticsearch syntax.

query A 는
Group By / Date Histogram / @timestamp
Set only the last three hours of data to appear in the chart through .

Here’s my question.

query B는
Group By / Date Histogram / @timestamp
the same as but not for the last three hours
I want to compare it with the data 24 hours ago of the time set in A.

How should I proceed with this
Please help me



~ the grafana team