this post was submitted on 19 Nov 2025
328 points (92.9% liked)

Programmer Humor

27391 readers
1622 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] marcos@lemmy.world 7 points 13 hours ago

It seems that you need to get better. There are plenty of valid complaints against SQL, but your problems seem to be all due to lack of familiarity.

No variables, no functions; Oh but you can do a CTE

Yeah, CTEs are more expressive than variables. And as somebody pointed, every database out there supports functions, you may want to look how they work.

UNION ALL, UNION ALL, UNION ALL… “There’s got to be a better way, surely…”

What do you mean by a "better way"? Union all is a perfectly valid operation.

And then you try put a MAX in a where and it won’t let you because you gotta pull all the maxes out in their own query, make a table, join them in, and use them like a filter…

Window functions exist.