Created
March 27, 2020 10:50
-
-
Save Piethan/3e9a74641d1547d242b9d6a23036871c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT date_format(t.change_time, "%Y-%m-%d") AS DATUM, date_format(t.change_time, "%H") AS STUNDE, q.name as QUEUE, tt.name AS STATUS, u.first_name, u.last_name, count(t.id) AS ANZAHL FROM ticket t | |
left join users u on | |
u.id = t.user_id | |
left join ticket_state tt on | |
tt.id=t.ticket_state_id | |
left join queue q on | |
q.id = t.queue_id | |
left join article a on | |
a.ticket_id = t.id | |
where t.change_time >= NOW() - INTERVAL 1 DAY | |
group by date_format(t.change_time, "%Y-%m-%d"), q.name, t.ticket_state_id, tt.name, u.first_name, u.last_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment