Store SQL statement as template report

Moderator: crythias

Post Reply
laylawan
OTRS newbie
Posts: 5
Joined: 06 Apr 2018, 11:24
OTRS Version?: Version 6

Store SQL statement as template report

Post by laylawan » 09 Aug 2018, 08:20

Dear all,
I would like to extract the parent and child ticket in a report but found that there is no such template report in Statistics. So I have type my SQL statement to get the data that I needed. However, can I save this SQL statement as a template for report/ statistics? As I would like to let user to generate the report by themselves and no need to input the SQL.

Here is my SQL statement:
SELECT id as Ticket_ID, title, target_key as Child_ticket FROM
(select id, title from ticket) as ID
left join
(select source_key, target_key from link_relation) as SK
on ID.id = SK.source_key
order by ID ASC

Thanks & regards,
Layla

Post Reply