Retool had a lovely feature I used all the time on my complex queries. I could click the dot menu next to a query, and have it auto-format it.