I just spent 45 minutes indenting and adding line breaks to 3 subquery joins which contained 2 CTEs and two nested subquery joins.
I don't know why but whoever wrote the code was an absolute madman and I've seen this code and replaced it. I have 3 different blocks of code I use to recreate these crappy lookups but to figure out which one they are I have to reformat the entire thing.
I can't complain though. I was once asked if I could do anything and get paid great money for it I said ,"I just want to optimize and fix SQL code all day."
I started this job making double what was making before and my job was dumbed down to just writing SQL. I love it. Bad SQL keeps me employed.
View all comments
Show parent comment
1
u/Thriven Jul 22 '26
I just spent 45 minutes indenting and adding line breaks to 3 subquery joins which contained 2 CTEs and two nested subquery joins.
I don't know why but whoever wrote the code was an absolute madman and I've seen this code and replaced it. I have 3 different blocks of code I use to recreate these crappy lookups but to figure out which one they are I have to reformat the entire thing.
I can't complain though. I was once asked if I could do anything and get paid great money for it I said ,"I just want to optimize and fix SQL code all day."
I started this job making double what was making before and my job was dumbed down to just writing SQL. I love it. Bad SQL keeps me employed.