Re-arranging my data table

Hi all

this is my first post here and am fairly new to Grafana
am using Grafana v9.3.1 Cloud

i have the below table which is extracted from loki logs

and i am trying to re arrange the field to something like this

thank you in advance