@roger Love the use cases here for using TextExpander to help with repetitive SQL commands and queries. When I joined TextExpander and discovered this use case in my role as the data analyst, it too improved my SQL productivity. Here are a few of my saved Snippets:
abbr ;sqlepoc (inserts the command on how to change dates stored in EPOC format to calendar format)
dateadd('ms', <epoc column name> ,'1970-01-01')
abbr ;sqlgrant
grant <database privilege> on <db object> in <schema name> to role <role name>;
This has been a time saver not having to search google for the syntax. At the same time, I can create drop down lists or user fill-ins to enter the elements within the <>.
Along with the personal SQL snippets, we created Shared Team SQL snippets to support our finance and customer facing teams. Creating SQL report snippet that our teams can expand allows them to self-serve on specific requests without the involvement of the data or engineering teams. These generally start as a one-off request and when the usage meets a threshold, they become candidates for a formal dashboard or report in our BI tools.
Looking back on my data analyst career, I wish I had found TextExpander sooner. The number of hours I could have saved in sharing and expanding existing SQL snippets vs having to dig through GitHub repositories, looking through old code or asking co-workers to copy/paste and share their code would have been immeasurable.