Timeseries with Postgresql is displayed a single graph, with GROUP BY 1,2

Grafana 9.3.2 on Mac
I have a table with time, varchar field value and id on Postgres. I want to group by value in order to display more than one graph - one graph per value (in may example I have two).
I tried to debug the result and see data like:

1674562200000 "one" 200
1674562200000 "two" 300

etc. lot of rows like this.
I expect to see two graphs: for “one” and for “two”, but instead I see one single graph in which all those dots are connected (there are lot of vertical lines). What do I do wrong? Should I set some parameters somewhere?
The query I use:

select 
  $__timeGroupAlias(closed_at, $__interval),
  disposition::varchar as "metric",
  count(*) 
from case_closed 
GROUP BY 1, 2
order by 1

Might need to do the followimg

1 Like

Thanks a lot, it worked!
In my view it was displayed like this (for reference for future sufferers):

1 Like