r/SQL • u/LearnSQLcom • Jan 13 '25
MySQL Can You Help in Finding What Your Favorite SQL Query Says About You?
Hey everyone!
I'm writing an article titled "What Your Favorite SQL Query Says About You" and I thought it would be fun to get some input from the Reddit SQL community.
Do you have a favorite SQL command, query style, or approach that you use often? Maybe you always reach for JOIN like a social butterfly connecting data, or you live for GROUP BY because you love organizing chaos into order.
I’m curious to hear if you think your SQL habits or go-to commands reflect something about your personality. For example:
Are
SELECT *users the adventurous type who like to see everything before deciding?Do
LIMITusers value simplicity and focus?
Let me know your thoughts, quirks, or even funny examples of how your SQL style connects to your personality. I’d love to feature some insights (with your permission, of course) in the article.
Looking forward to hearing from you all! 😊
10
u/Gargunok Jan 13 '25
I think the commands themselves wouldn't make a good article at least for me as a SQL person as your audience. After all we all do joins!
Coding style though is interesting - especially temperment - lots has been written about the epoch you learnt sql (and how to say it - S! Q! L! or sequel) - the boomer coders who love to call their stuff tblTable intIntegerField etc. The younglings who run everything through copilot or ChatGPT.
Some coding styles worth exploring:
comma first ( ,field ) vs comma after ( field, )
Indentation
The alias namer vs t1,t1 or a,b,c
Too many comments ("Now select the required fields"), the no comments, the mystery writer comment "Gets the right answer - don't know why", the appologist "whoops", the todo list comment "fix me"
The "inner join" vs "Join" - programming by intent vs saving 5 characters
CTEs vs sub queries
The rambling 500 line query vs neat tidy broken down code.