Does anyone have a grafana dashboard which is using timescaledb as the backend?
I am having a hard time doing a group by – the query works but I only get 1 line whereas I am expected to see as many lines as by group by (host) in my case.
Hi Rita, I remember I did it several times and we have a few content around it. As far as I remember, you just need to name your column “as time” or cast it properly.
SELECT
--1--
time_bucket('1 day', pickup_datetime) AS time,
--2--
COUNT(*)
FROM rides
WHERE $__timeFilter(pickup_datetime)
GROUP BY time
ORDER BY time
You can also learn in details through this video series: https://www.youtube.com/playlist?list=PLsceB9ac9MHTjwvV18QJnPcLrTXm_Q-Ft