New in grafana and problems creating graphs


I’m starting with grafana and I’m looking for documentation about how to represent data in grafana, so my first question is if some can give me few advices about how to start with grafana…

My other question is the next:

I’m having troubles trying to represent this data in a graph:

I have this data:

and my sql query is this:

select DATE(Fecha) as time_sec,
sum(importe) compra
FROM DatosContratadosIO
where idCliente=1
GROUP By time_sec,idCliente
Order BY time_sec DESC

if I represent it in grafana the result is this:

But removing the “where” clause the result that I expect is having a line by idCliente but grafana draws a line by “Compras” and other line by “idCliente”…

Can someone tell how to represent data by idCliente in this query

thanks very much in advance,