SQL Queries within RT

Hi,

I'm trying to find the SQL for the ticket searching aspects within

RT. I’m trying to tweak these queries instead of writing my own, does
anyone know where in the code I can find these queries or how these
queries are generated by RT?

Thanks,

Kevin
Zumiez, Inc.