• expr@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    1 hour ago

    No variables, no functions

    Every major SQL implementation includes both of those things. Of course, it’s rarely needed or desirable if you know how to properly write SQL.

    “So why can’t you do that with expressions?”

    You can alias expressions.

    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…

    Wtf are you talking about? For one, filtering by the output of an aggregate is what the HAVING clause is for. But even if that didn’t exist, you could just use a subquery instead. You don’t need to make table…

    Tbh it just sounds like you don’t know SQL very well. Which is fine, but doesn’t make for a very compelling criticism. SQL does have warts (even though it’s great overall), but none of what you described are real problems.