Aggregate job runtime for users


I am new to grafana and have setup a elasticsearch datasource that has all my slurm job information. I am trying to figure out if there is a way for me to create a dashboard that will show the top users on a daily basis that have run jobs in a given partition. I have the following fields that should help:

"partition": "G-1GPU-8Cpu-58GB",
"username": "xxx",
"@start": "2020-06-04T15:13:32",
"@end": "2020-06-04T15:23:42",
"elapsed": 610,

I would like to take all jobs in that partition and sort them by top user by runtime. Any help would be greatly appreciated.