5
19 Comments

SQL as a core skill?

I know. SQL isn't the trendiest and sexiest tech, but it gets the jobs done and mostly applicable to any companies.

Whenever we need to access production data and answer basic business questions, SQL is always the way to use at first try.

Once I was amazed to watch a senior engineer quickly compose concise SQL queries, get results back in seconds, and win lots of respect from other co-workers.

That made me realize SQL is a core skill you can really depend on, but it also requires training to write SQLs like a second nature.

Did you ever feel the same way?

on May 9, 2020
  1. 5

    Yes. Beginning and end of story.

    The ability to write, read and understand SQL has served me well for almost 30 years now. SQL has lasted through VBScript, VBA, VB5, VB6, VB.Net, Java, C#, C++, JavaScript, TypeScript, Python and Kotlin.

    1. 1

      Do you remember when was the first time you realized the power of SQL? Was it your saw some SQL ninjas writing queries and inspired you? Or via reading books?

  2. 3

    I set out to be a front end dev but before doing so my company put me in a role where I wrote SQL scripts all day every day for about 8 months (stored procedures power our client facing report tool).

    I wasn’t thrilled about doing it at first because I wanted to dive right into the front end technologies I had spent over 18 months learning but now that I am in a dev role I’m so glad I have that knowledge for a number of reasons. One being I have far greater understanding of the entire platform instead of just one little section that a specific dev team works on. I work on an enterprise platform so most of the devs, other than the few that literally built the program, don’t know much outside of their little section of it. I dealt with the data that runs the whole thing so I’m very familiar with how it all ties together.

    The other main reason is that I’m far more capable at troubleshooting and figuring out data related issues on my own. I don’t need to talk to a senior dev or a DBA to try to track down data issues or filter through API error logs. I just hop in to SSMS and script away.

    1. 1

      Thanks for sharing your experience!

      How did you pick up SQL? Did you learn it through reading docs? Or you had the help of a senior engineer?

      1. 1

        I learned some general concepts (basic selects, update, delete) through my learning of front end development, but the more complex stuff (dynamic SQL, pivots, temp tables/sub-queries, window functions, etc) I learned through my teammates/manager, docs, tutorials, and trial and error. Even with that, I feel I've only scratched the surface of what can be done with SQL. It is a very powerful tool every developer should have some base knowledge in.

  3. 3

    Definitely a core skill. You might be able to get away without dealing with it for a while, but at some point in your career you're going to have to get data out of a relational database. There are query builder apps available that will generate SQL for you, but you should at least understand the basics of SQL so you don't end up looking like a noob when you are already well into your career. It doesn't even have to be second nature, just a basic understanding.

    Side note: There are several dialects of SQL out there, so what works on MySQL might not work on Oracle. But the basic concepts will be the same.

    1. 1

      so you don't end up looking like a noob when you are already well into your career.

      I found that sometimes people at this stage don't realize, or are unwilling to admit, that they might need to spend time learning SQL again until situation forces them to, like a senior dev leaving now he/she is the only one is capable of running queries.

      I didn't mean to offend, but did you find the similar type of resistance among you or colleagues around you?

      1. 2

        I think it is really easy, especially in this industry with so many choices out there, to be biased towards whatever technology you happen to already know. Or in other cases only want to learn the latest thing because you feel that it is going to be better than anything else that is out right now. The truth is, that you should get really good at just a few things, but be well rounded enough to know a bit about several other things. This helps you to maintain a context of how what you are doing fits into a bigger picture, and also flags yourself to bring in outside influence when you know you are going outside your area of expertise to avoid making bad design choices.

        So even if your world revolves around NoSQL databases, you should still understand the basics of relational databases and in what situations they are most appropriate in - even if you don't feel comfortable working with them yourself. The reverse is certainly true as well. If you are an expert at SQL, you should also understand when document and key/value stores are way more efficient than a SQL database. Don't pound in a screw just because you happen to have a hammer instead of a screwdriver.

        No one is an expert at everything.

  4. 2

    The benefits of learning SQL become more significant every year. SQL has had a tremendous growth in usage over the last couple of years. Now this trend continues, because companies collect more and more information, which then has to be stored and comprehended.

  5. 1

    I have a blog website named Paintball Mask USA. Please tell me the answer to one question about to improve the code and prevent SQL injection attacks.

  6. 1

    Yes. Especially since, in my experience, many web developer don't have enough skills in SQL. I saw them using ORMs all their career, and when you need fast SQL queries for some reporting for example, everybody is lost.

    If you want to market yourself as SQL expert, I think you'll have a lot of opportunities.

  7. 1

    I am happy the nosql fad has faded, and we do not have to defend that SQL is relevant anymore.

    SQL databases offer one of the most reliable way to store data and access it in a with good performance.

    I think you absolutely need to master the basics of SQL for sure if you work in software development, and also the basics of database (basically how binary indexes works, the interest to do big queries at once instead of a lot of small queries...). I have found no exceptions in my 20 years career.

    Whether you absolutely need to be an advanced SQL query developer though is a matter of choice. It is a very useful skill to perform complex embedded queries, but probably not all people in a development team need to have this skill. There are also alternatives, such as mixing code in, say, java and C, to simple SQL queries to get the equivalent of complex SQL queries.

    1. 1

      I agree. Based on my startup experience, most companies use frameworks (e.g., ruby on rails) to manage database. I didn't see that many advanced SQL used in practice, like store procedures, partitions.

      It is a very useful skill to perform complex embedded queries, but probably not all people in a development team need to have this skill.

      What do you mean by complex embedded queries? Is is nested sub-queries? I will see that as a basic SQL skills though.

      1. 1

        Hi,

        3 or 4 level nested queries in SQL are one of the programming tasks that gives me more headaches. I have the feeling I am not the only one, but maybe I just lack training.

  8. 1

    100 times yes. SQL is a fundamental DB skill that every developer (especially backend) should know because you can use it in so many scenarios.

  9. 1

    Yep! It’s an incredible skill when you can reason about data and extract what you’re looking for, also good way to easily impress people.

  10. 1

    Yes :)

    I help people at work all the time who are unfamiliar with SQL, and as a direct result, are unable to do any analysis on what our users are doing.

    I also regularly run into my own limitations (both knowledge of our schema and my own comfort with SQL). Then I get help from our data analysts who are banging on it all day.

    I've been writing SQL for 15 years on and off.

    1. 1

      my own limitations (both knowledge of our schema and my own comfort with SQL).

      By comfort with SQL, do you mean some advanced SQL concepts, like partition, views, etc.?

      I used to have Postgres website open at the side window to know how to do GROUP BY and using the string functions. Later I got more familiar but still had to refer to documentation if I want to do pivot tables with CROSSTAB. Do you feel the same way?

      1. 2

        I think my limitations are less conceptual and more that our company has its own SQL variant, and I don't use SQL in general that regularly.

        Same as ay language, if I don't use it regularly, I lose fluency.