...you know that there's a significant group of, uhm... "programmers", that are really afraid of SQL and do everything to wrap it in things like ORMs and hope they'll never have to write it or think about it, right? As a programmer, I only started to like and "understand" SQL after learning more about the underlying relational algebra and seeing its beauty, but it was just a stream of WTFs for me before that... and some kids that I recognize as "thinking the way I do" can learn programming in Python starting from 0 in less than week but look at SQL with a complete "wtf" face ...I guess different people really think differently ...sometimes it's scary how differently
indeed ...but: try explaining to someone who has just went through the effort of picking up a general purpose programming language why does he need to learn "a retarded query language that doesn't even have functions, loops and assignments" :) ...of course, you can answer him "well... but actually it does" and expose him mercilessly to the world of sql extensions before he even learned basic sql.
I don't think of SQL as programming -- programming is telling the computer what to do, SQL is describing the data that you want and letting the computer figure out how to get it to you. Regular expressions work the same way.
The worst SQL is done by people who treat it like a programming language.
I've taught SQL to non-developers and most pick it up pretty easily as long they're taught the right way.
Small correction: The worst SQL is done by people who treat it like an imperative programming language.
SQL is a declarative programming language. It's probably much easier to learn for people with experience in functional programming (where you also specify what you want, not how to get it), and tools like Excel, than people who are used to thinking about telling the computer what to do.