Help with Table plugin

Hi all,
I am (somewhat) new with Grafana. I have done simple dashboards for a while, but I am starting to build more complex things, and trying to understand better how to use it.
FYI, my data source is elasticsearch.

I need some help with the table plugin. I am not sure if what I want to achieve is possible.

I receive a log like this every minute:

In a table, I would like to do a monthly document aggregation as follows

Device | Total Count of Documents | Count of Documents with Temp > 8 | Ratio (Count of Documents with Temp > 8 *100 / Total Count of Documents)

So it would look something like this:

device1 | 43200 | 1000 | 2.31%

I could also use a constant instead of total count of document if there is a way to use constants (one doc per min * 30 days = 43,200)

Is this possible to do in the Table plugin?