I have a jsonb object in Postgres column named metrics with following structure:
{"http": {"GET": {"statusCode": {"200": {"count": 100}, "500": {"count": 322}}}}}
I want to get total count by different httpmethod, statusCode so that I can plot it using Grafana. Can someone point me how can I use group by. Expected result should be:
httpMethod statusCode sum(count)
GET 200 100
GET 500 322