KQL condition & operator reference

GFI HelpDesk reports gives you the power to define the various types of functions and operators in your KQL statement to get the required information from your helpdesk data.

Almost all of the MySQL functions and operators can be used along with your own custom fields in GFI HelpDesk.

In this topic, we'll walk you through the different categories of KQL functions and operators along with sample KQL statements.

The KQL functions are categorized in the different categories based on their usage in the report.

Conditions and Operators

Operator KQL Example Results
= SELECT 'Chats.Chat ID' FROM Chats WHERE 'Chat.Department'= 'Technical Support' Report to include all past chats that belongs to the Technical Support department.
!= SELECT 'Tickets.Ticket ID' FROM Tickets WHERE 'Tickets.Department'!= 'Sales' Report to include all tickets that DO NOT belong to the Sales department.
IN SELECT 'Tickets.Ticket ID' FROM Tickets WHERE 'Tickets.Department' IN ('Sales', 'Support', 'Billing') Report to include all tickets that are in one of the following departments: Sales or Support orBilling.
NOT IN SELECT 'Tickets.Ticket ID' FROM Tickets WHERE 'Tickets.Status' NOT IN ('Closed', 'In Progress') Report to include tickets that are not set to the statuses Closed or In Progress.
LIKE SELECT 'Users.Fullname', 'Users.User Organization' FROM 'User Emails', 'Users' WHERE 'User Emails.Email' LIKE '%GFI HelpDesk.com' Report to include all users whose email address matches '%gfi.com', where '%' means anything value.
NOT LIKE SELECT 'Users.Fullname', 'Users.User Organization' FROM 'User Emails', 'Users' WHERE 'User Emails.Email' NOT LIKE '%GFI HelpDesk.com' As above, but includes users where the email address does not match '%hotmail.com'.
AND SELECT 'Tickets.Ticket ID'FROM Tickets WHERE 'Tickets.Department'= 'Sales'AND 'Tickets.Status'= 'Open' Report to include tickets that are in the Sales department and a reset to the status Open.
OR SELECT 'Tickets.Ticket ID'FROM Tickets WHERE 'Tickets.Department'= 'Sales' OR 'Tickets.Department'= 'Support' As above, but includes tickets that are in the Sales department or the Support department.