Hi Community
Need your help.
I have successfully connected MariaDB to grafana using the mysql plugin and able to chart the timeseries using below query
SELECT
__timeGroupAlias(datetime,__interval,0),
count(items) AS “No of Items sold”
FROM itemsales
GROUP BY 1
ORDER BY __timeGroup(datetime,__interval,0
Its properly showing the timeseries with the count of items sold over time. I am trying to find the item names sold when i point the cursor on map along with count. I have tried adding the items column, but its listing all items and not just the items at that point of time. Below query is not giving what i am looking for. Please suggest
SELECT
__timeGroupAlias(datetime,__interval,0),
count(items) AS “items”,
items AS “items”
FROM itemsales
GROUP BY 1
ORDER BY __timeGroup(datetime,__interval,0)
Thanks in advance,