Grafana error sort by time

Some grafana panels error with the following, how this can be solved please