Bar Chart with flter

I’m using Grafana 8.0.4 version

I have an sql database like this one:

Data Ora Indir.Prim. ID Fabbr. Valore Unit… Descrizione Tipo Modulo Posiz. Tariffa
01/07/2021 00:00:00 1 1112302 SVM 1 39060 kWh energy accumulation positiv instant. 0 0 0

I have the below sql code that is working fine on sql database:

from master
WHERE ID=“1112302” and Descrizione=“energy accumulation positiv”
group by year (newData), month(newData)
order by year(newData), month (newData)

but I’m not able to plot this data with Bar Chart where I have a value for each year/month
How can I manage this code to work in Grafana ?
Is it possible to filter/change the graph changing the ID number from the panel tab ?

Hi @luca10

Can you share a screenshot of your query editor? And maybe your data as it appears in either the table panel? Or copy/paste the data from clicking inspect => data on the panel?

And what specific datasource are you using/querying?