Is it possible to simplify a SEDE query that has the same formula written multiple times?
For instance, this query is writing rtrim(LOWER(Title)) five times:
select
rtrim(LOWER(p.Title)),
count(rtrim(LOWER(p.Title)))
from Posts p
group by rtrim(LOWER(p.Title))
having (count(rtrim(LOWER(p.Title))) > 1)
order by count(rtrim(LOWER(p.Title))) desc
In answers, please specify if your factorisation is purely cosmetic or if it also has a performance impact.

Based on the link for your query, it looks like you're using the
LOWER()andRTRIM()functions for the sake of comparison.TSQLby default is case-insensitive, and trailing spaces to the right are ignored. You can get the same results via the following: