Ticket SQL - How involved can the 'Advanced' queries get?

I had a service rep come ask me about writing an search that could tell if the search was run on a Monday or a different day and display the results accordingly.

Does the Advanced query portion allow for CASE or IF statements? Is there any ‘deep dive’ documentation on what you can do with the Advanced Query Builder?

Hi.

Don’t know I understand the question complete, but I’ll try.
Maybe there is a XY-problem (https://xyproblem.info/)

Do you want searches beased on weekdays or do you want the day written down in the results?
Second one I don’t know. First one some ideas.

The searches in RT are SQL-searches that apply to ‘now’. You can’t get information about the state ‘yesterday’.
In the advanced part IMO one can use nearly everything that is supported by the used DBMS. So the documentation is the SQL-documentation. Maybe you can give this a try.

If you want different searches on different days maybe use a search for every needed day.

If you want to give reports every eg Monday you maybe can use rt-email-dashboards

Maybe the rt-crontool is a solution rt-crontool

And at least you can use th API to search with external scripts or software.

Kind regards, Andre.