we are back to zero, your time stamp is not UTC
Let me try to spin a db with your sample data and see what I can get
we are back to zero, your time stamp is not UTC
Let me try to spin a db with your sample data and see what I can get
oops mislead you with some data part with the new york tag would should have been new_york sorry
you might also need to do this since you are on an older version of grafana ( I would highly recommend upgrading)
select time,
count(opened_defect) as opened_defect,
count(verified_defect) as verified_defect,
count(in_progress) as in_progress,
count(in_grooming) as in_grooming,
count(closed_defect) as closed_defect
from (
SELECT
convert_tz(STR_TO_DATE(DATE_FORMAT(created, '%Y-%m-01'), '%Y-%m-%d'),'America/New_York','UTC') as time,
CASE WHEN status = 'Opened' THEN 1 ELSE NULL END AS opened_defect,
CASE WHEN status = 'Verified' THEN 1 ELSE NULL END AS verified_defect,
CASE WHEN status = 'In Progress' THEN 1 ELSE NULL END AS in_progress,
CASE WHEN status = 'In Grooming' THEN 1 ELSE NULL END AS in_grooming,
CASE WHEN status = 'Closed' THEN 1 ELSE NULL END AS closed_defect
FROM
jira_metric_record1
WHERE labels LIKE '%prod_defect%'
) a
group by time
order by time
Thank you! will try one more time. What is the stable version of Grafana you recommend? I have 8.2.6
I would go with 10