Problem to show data in table

I am using PostgreSQL with Grafana. I made a query using command line with psql and the result was the expected:


But when I put the same query in the table the result was messed up:

I did not do anything in the table just I insert the query. Does anyone know why this is happening?

What exactly is messed up ? It looks fine.
Your result in the panel reflects the results from psql.

In psql the result is show in descending order of size. In the panel the order is random.

Does anyone know why the data is not being shown ordered? I already tried several combinations in options but it did not work.