[ElasticSearch DataSource]Dividing two elasticsearch metric series and groupby device

I need to devid two metric series( sum( hit request number)/ sum(total request number) ) which are groupby device id.
Get hit percent of each device, and show bottom five devices.

How can I do it in Grafana editor?
Thanks anyway

Please include this information:

What Grafana version are you using?


What datasource are you using?


What OS are you running grafana on?

OpenSuse 11