Hello,
I am looking to have my graph grouped by week, useful information here helps me to accomplish what we have here. Now at the time of the graph, I am looking to have the 2 values on the same group by WW, stacked.
Here my query:
SELECT DISTINCT CONCAT(“WW”,week(T.created_on)) as metric,X.SLAEXP as value,Y.SLAMET as value1,Unix_timestamp(now()) as time_sec
FROM ticket T
INNER JOIN
(
SELECT
week(created_on) as Week,
count(id) as “SLAEXP”
FROM ticket
WHERE $__timeFilter(created_on) and status = 1 and datediff(updated_on, created_on) > 0 and projectId in(2)
GROUP by week(created_on)
) X on week(T.created_on)=X.Week
INNER JOIN (
SELECT
week(created_on) as Week,
count(id) as “SLAMET”
FROM ticket
WHERE $__timeFilter(created_on) and status = 1 and datediff(updated_on, created_on) < 1 and projectId in(2)
GROUP by week(created_on)
) Y on week(T.created_on)=Y.Week
Results:
Any help on this will be appreciate it. Thanks!