Loki query alerting issue in Grafana

I am trying to create a Loki query alerting, but getting this error.
Failed to evaluate queries and expressions: failed to execute conditions: input data must be a wide series but got type long (input refid). how can I solve this issue?
Grafana Version: 9.2.6

@santrosyansevak does this issue solved for you ?

i am in the same phase now .how to fix this any suggestion ?

The loki query should return metrics, i.e. use some kind of aggregation. We do not support alerting on plain logs