I am building a panel for OTRS, and I am tring to make a panel ticket open vs close per day basis.
When I make these query it concatenate dont stack, as shown int eh image below.
SERIE A:
select DATE_FORMAT(t.create_time, ‘%d-%m’) as Dia, count(*) as Quantidade,
UNIX_TIMESTAMP(DATE_FORMAT(t.create_time, ‘%Y-%m-%d’)) time_sec
from ticket t
WHERE extract(month from t.create_time) = extract(month from now())
AND extract(year from t.create_time) = extract(year from now())
AND t.ticket_state_id IN (17,18,19)
group by 1
SERIE B:
select DATE_FORMAT(t.create_time, ‘%d-%m’) as Dia, count(*) as Quantidade, now()
time_sec
from ticket t
where extract(month from t.create_time) = extract(month from now())
AND extract(year from t.create_time) = extract(year from now())
AND t.ticket_state_id IN (1,4)
group by Dia
CAN SOMEONE HELP?