That's true. SQL knowledge is one of the few skills that didn't age. 1. C language. 2. *nix tools (shell and friends). 3. SQL. 4. Basic IPv4 networking. These things I learned around 20 years ago, they didn't change much and they are useful for me to this day.
Well, IPv4 is obsolete.
Learn SQL Once, Use It for 30 Years
201–210 of 243 posts
Re: Learn SQL Once, Use It for 30 Years
#202Earlier quoted context omitted.
My advice is: don't write complicated SQL. The best thing I learned about SQL is that it can do an awful lot of clever stuff but that the vast majority of the time you really don't need it. Learn the basics. Shrug the rest off.
What do you consider to be clever SQL?
Re: Learn SQL Once, Use It for 30 Years
#203Re: Learn SQL Once, Use It for 30 Years
#204Re: Learn SQL Once, Use It for 30 Years
#205I think the pretext of this articles is ridiculous. Yes, SQL is based around relational algebra, but all programming languages are built on a theoretical foundation. And SQL is very much a "fad" language - it just somehow managed to stick around. The goal was not some sort of mathematical purity, but rather to built a natural language data interface (sounds like something currently very hyped?) and it failed spectacu…
> Sometimes '=' is an identity test, sometimes it is `==`. Eh... Where did you find `==` used in SQL?
SELECT 2==2
But maybe that’s on them and not on SQLRe: Learn SQL Once, Use It for 30 Years
#206Earlier quoted context omitted.
I’ve experienced what you’ve mentioned before, ORM or not you have issues if you’re shuffling the schema around. Cool.
It would be great if there was a compiler that would check your SQL queries against the schema, and you could even refactor a column name to update both the schema and the queries.
https://learn.microsoft.com/en-us/sql/ssdt/sql-server-data-t...
Re: Learn SQL Once, Use It for 30 Years
#207Earlier quoted context omitted.
Current structure makes sense to me. SELECT .... what do I want FROM .... where is it WHERE .... what filters do I want to apply GROUP BY .... how do I want it aggregated Maybe it's just that I'm so used to it. I could see FROM being first, that would actually make a little more sense to me.
A pretty common request is to lift the FROM up before the select, like the below. I'm pretty fine with status quo since my mind is usually "hmm what do I need to get" first, then I figure out how to get it, but some engines (duckdb, I think?) support both so everyone gets their cake. What people often want:
Re: Learn SQL Once, Use It for 30 Years
#208SQL was the foundation of a second career in business data analytics. Moderately interesting and paid the bills.
I must say, it's not just select *, joins and so forth. The human side was important. Always being on the lookout in Big Corp for people hungry for data (lots of them), and working to find quick solutions.
Re: Learn SQL Once, Use It for 30 Years
#209You can think of a view as a function that computes an output table from N input tables. Kinda like how Excel works but with tables instead of cells. That is extremely powerful.
Re: Learn SQL Once, Use It for 30 Years
#210> If you are a junior developer, “learn SQL properly” is the most valuable 40 hours you can spend. Not a tutorial. Not an ORM. Actual SQL: joins, subqueries, window functions, query plans. That investment pays you back at every job, in every stack, for decades This is the power of low-level reasoning. Today, even for a junior developers, even if they have AI that solves syntax problems, SQL teaches you to reason and…
I find SQL a very thick "wrapper masking low-level logic". Think of the query planning, the index-maintaining, the upholding of guarantees, the writing-to-disk and caching that you are all not doing by using a RDBMS! I'd say SQL is a very high level language. "SQL teaches you to reason and approach problems logically" -- I kind of agree here. It teaches relational data mgmt. I think it is better to attack most softwa…