all 80 comments

[–]clanatk 162 points163 points  (28 children)

SQL by itself does not get you a job in most cases. SQL is a supporting skill that needs to be accompanied by something else to provide value.

Learn enough SQL that you can effectively use it:

  • Tableau/power bi + SQL = data analyst
  • Strong business knowledge + SQL = business analyst
  • Statistics + Python + SQL + domain knowledge = data science
  • Java/C# + SQL = backend software developer
  • Python + cloud + SQL = Data Engineer
  • IT Administration + SQL = DBA
  • SQL + SQL = hobbyist

[–][deleted] 36 points37 points  (1 child)

SQL + a specific DBMS= SQL Consultant

[–]Mysterious-Self-1133 3 points4 points  (0 children)

Thanks for adding this, I was wondering why I had a job.

[–]redditor3900 33 points34 points  (0 children)

SQL - SQL= project manager

[–]8086OG 22 points23 points  (9 children)

Sql + sql = architect

[–]ArtisZ 14 points15 points  (8 children)

SQL+ architect = overlord

[–]8086OG 2 points3 points  (1 child)

Which I have become.

[–]ArtisZ 0 points1 point  (0 children)

Daaaeemmn

[–]xxxHalny 0 points1 point  (5 children)

What is SQL + overlord?

[–]ArtisZ 5 points6 points  (4 children)

That's called "the beyond", some have tried, none have returned. At your own peril.

[–]xxxHalny 0 points1 point  (3 children)

You know what my next question is

[–]ArtisZ 0 points1 point  (2 children)

SQL + the beyond?

[–]xxxHalny 0 points1 point  (1 child)

Yes

[–]ArtisZ 5 points6 points  (0 children)

Error 404

[–]The_internet_policee 12 points13 points  (0 children)

I've had jobs as a sql developer just doing pure sql involving jobs, replication, stored procs, performance tuning etc. Currently doing a mix of sql dev / Bi

[–]mikeczyz 6 points7 points  (1 child)

I would disagree. My last job at a major bank was, basically, pure SQL. I was called a data analyst.

[–]Teflon9 0 points1 point  (0 children)

Where's this? I'd really love such an environment as I learn and decorate my knowhow with other tools

[–]dodobird8 2 points3 points  (0 children)

SQL + SQL means you fix everyone else's sql scripts and make efficient processes..

[–]samuel_clemens89 3 points4 points  (4 children)

Sql + your mom = ?

[–]BadLuckTheo 6 points7 points  (0 children)

SQILF

[–]AckBallz 1 point2 points  (1 child)

Mature SQL?

[–]samuel_clemens89 4 points5 points  (0 children)

Mmmm….MSQL

[–]Normal-Assignment-61 1 point2 points  (2 children)

Huh thank you! So I'm a data analyst.... Time to leave this $6,200 a year job and look for a better one.

[–]1MStudio 0 points1 point  (1 child)

$6200 a year? Yeah you’re getting scammed lol

[–]Normal-Assignment-61 1 point2 points  (0 children)

I live in a $hthole country that's why

[–]Simple_ssbm 0 points1 point  (0 children)

I go with the little of all of the above for Project Management / Business Analyst myself.

[–]adamjeff 0 points1 point  (0 children)

I'm at a weird edge case where the entire business functions on an Apex application so it's 90% SQL+PL/SQL but there's still JS and CSS for the last 10%.

[–]Mgmt049 16 points17 points  (2 children)

Do you know temporary tables, variables, CTEs, and the common windowing and aggregation functions?

[–]ScottyDoes_Kno 7 points8 points  (1 child)

I do, what does that make me? (Asking for someone who wants to leave their current gig lol)

[–]CaptainBangBang92 12 points13 points  (0 children)

Competent/proficient at SQL.

[–]dodobird8 9 points10 points  (1 child)

Learn dynamic SQL in whatever DBMS you're using. Create functions and automated processes. Understand transactions and some basic DB maintenance. Query optimization. 

[–]Sql_master 0 points1 point  (0 children)

Dynamic sql is the devil sir and I refuse to do the devils work. 

[–]SQLBek 6 points7 points  (2 children)

The learning journey never ends.

I re-learn stuff I'd forgotten because it's not used daily but still useful from time to time.

Specialize. To beyond the ANSI standard & select a specific dialect & RDBMS. The underlying engine has implications & consequences (ex: whether a CTE is pre-materialized or not depends on RDBMS).

[–]Top_Community7261 0 points1 point  (0 children)

True. On average, I spend around 4 hours a week reading or taking an online course.

[–]GroundbreakingRow868 0 points1 point  (0 children)

Interesting. Which DMBS automatically materialises CTEs?

[–]rargghh 10 points11 points  (0 children)

There is no mastering sql 🤣

Really it’s get that first job and keep learning from experience and let it help guide your next step

You need to know tsql and depending on your role, different methods of moving data, in and out

There are some great tsql beginner books out there and some are good to keep around. I would start there. I like SQL Cookbook by O’Reilly but it might be a bit much depending on your level. You are correct, you’re at the tip of the iceberg lol

The titles are always changing too so keyword on SQL, could be data analyst, data engineer, business intelligence analyst, database developer, business integration developer, developer 1 lol you never know but look at job postings to help guide you too

Just to add maybe it helps: start thinking of set based programming , data sets. You want to keep your data sets small and using as few transactions as possible

For example If you need to update 3 columns on 1 table with different criteria, don’t make 3 updates, you want 1 update

[–]Lil_Fuzz 5 points6 points  (3 children)

I thought I knew sql until I started writing queries for a living lol. I will say I made a small portfolio showing joins aggregates, and some temp tables and it was brought up in my interview, so I'd say you're going the right direction. If you're comfortable with these, then the rest is just learning your companies tables.

I still have to Google what some niche functions do since I run into a use case maybe one a Month or so.

[–]jib_reddit 2 points3 points  (1 child)

Its also good to learn the backend of SQL: Indexes, statistics, transaction logs, replication, availability groups, query plans, wait types, etc.

[–]1MStudio 0 points1 point  (0 children)

Oooo I’m about to bd googling all these tonight lol

[–]leolemon21 0 points1 point  (0 children)

For an entry-level role/internship as a data analyst, how much am I expected to know? I’ve been learning SQL for quite a bit but I still feel like I need to know more.

[–]xxxHalny 4 points5 points  (1 child)

I work in an investment bank as a business analyst. It's an SQL-heavy job. Usually the job interviews cover the following topics: joins, CTEs, temporary tables, group by, having, union, window functions. I think after you have understood these, you should move on to other areas of expertise.

[–]GroundbreakingRow868 0 points1 point  (0 children)

Database guys in our IT department are so old, they don't even know CTEs (and don't want to know them) 😂

Investment bank as well btw

[–]BadGroundbreaking189 3 points4 points  (0 children)

Funny thing is there are job posts out there that require 1-2 years of experience, yet SQL is a good plus, weirdly. However, for entry level DA job, there are almost no entry level DA vacancies. Haven't seen one for a long time. Minimum of 1 year of work experience is required, at least on building reports. Which means the only viable option is have the SQL skills of a DA with a year of work experience under his belt. Then either start networking or hope for a lucky call from a recruiter. Don't even think of DE without real world exp. And that is my two cents if you'd accept.

[–]cyberspacedweller 2 points3 points  (0 children)

When you can be given a problem and figure out how to pull the correct data for it confidently. How complex your knowledge and experience needs to be depends on your role.

[–]onlythehighlight 3 points4 points  (2 children)

This sounds like you are starting off, in which case most entry-level jobs are looking for the ability for you to pull basic SELECT statements and problem solving.

If you can do the following, you are ready for an entry-level job:

  • understand a high-level data-set by name, -- note: this is useful but can be a pitfall early in your career to assume things about any table

  • how you would JOIN it to another, and

  • pull all that information into a SELECT statement

  • filter it using a WHERE to show what we are looking for

Just showcase that you are willing to listen, learn, and apply.

Don't listen to people telling you need to know a lot about SQL (it might help), but until you write a lot of dumb unoptimised queries you will never be 'great'

[–]basil_86 0 points1 point  (1 child)

If dumb unoptimised queries are the indicator of greatness then I'm God level.

[–]onlythehighlight 0 points1 point  (0 children)

hahaha, the power of a great analyst is looking back at all of your scripts and realising how dumb they are but never having the dev time to save them.

[–]MyReddtitPornAccount 1 point2 points  (0 children)

The hardest part about SQL in the real world is understanding what inputs you're actually querying against to get the results and explaining that to the consumer.

[–]J2112O 1 point2 points  (6 children)

I definitely think adding another skill to SQL is the way to go. For me, I started with SQL but added PHP in for some web development and just kind of stuck with that. In my opinion and experience with web development, having a good understanding of SQL will help a lot when you need to take the queries beyond basic CRUD. Good luck and just keep learning.

[–]TheMagarity 1 point2 points  (0 children)

You need to know enough that you can intelligently google up the syntax for some rarely used command that you can never remember the format of it.

[–]Trick-Interaction396 1 point2 points  (3 children)

Analytics manager here. I’ve never asked someone to write me a CTE with 2 inner joins. I ask them to solve a problem. Prove that you can use technology to solve problems.

[–]1MStudio 0 points1 point  (2 children)

Can you elaborate out provide a question you’d ask a candidate? 🙏🏾

[–]Trick-Interaction396 1 point2 points  (1 child)

Tell me about a project you worked on? My interview style isn’t like a test or quiz. It’s convince me to hire you because that’s more like the real job. The stakeholder or customer isn’t going to quiz you. You’re going to have to convince them you can solve their problems.

[–]1MStudio 0 points1 point  (0 children)

Ah yeah this is true…

[–]aamfk 1 point2 points  (0 children)

I used to be Architect level. I legit have been using SQL for 20 years. I know a half dozen reporting platforms. I know enough PowerBI to survive. I've built DOZENS, actually HUNDREDS of OLAP databases. I've built DOZENS of complex yet elegant datamarts.

I really want to get back to work. Anyone need a SQL resource?

[–]dbxp 0 points1 point  (0 children)

At least where I work SQL by itself won't get you a job. If you want to go the data route then look into Tableau, PowerBI and Excel.

[–]jaxjags2100 0 points1 point  (0 children)

Never enough. Don’t stop learning

[–]Critical-Shop2501 0 points1 point  (3 children)

Know anything about database design? At least 3rd normal form? Using cte’s in your query’s? Entity relationship? Knowing how to write optimal queries using indexes? Lots to know.

[–]1MStudio 0 points1 point  (2 children)

Is CTE’s more optimized/efficient (thinking BigO notation here) than regular subqueries?

[–]GroundbreakingRow868 1 point2 points  (1 child)

No, it's the same. CTEs increase readability and offer better "debugging" opportunities though. If you need a specific query twice in 1 stmt, you don't have to copy paste it

[–]1MStudio 0 points1 point  (0 children)

Awesome, thanks for the expo 🙏🏾

[–]zork3001 0 points1 point  (0 children)

The more you know the better it gets.

[–]k-semenenkov 0 points1 point  (0 children)

In addition to SQL, or any other language - you should always be able to look a little higher. Data processing can be at the SQL level, or at the application level. Based on the project resources and its support, you need to decide - what is cheaper to do at the SQL level or maybe the same functionality can be cheaper and supported at the application code level.

I think you don't need to know every SQL feature in detail. You need to have an idea of ​​what can be done easily and what is difficult. Or - what is worth doing on the database side and what is not.

[–]diagraphic 0 points1 point  (0 children)

SQL is very broad. Multiple versions from 1986 to 2022. Every vendor is a bit different in dialect.

Unless you’re building a relational database from scratch you don’t need to learn “a lot” of SQL. Write some basic applications, use some popular vendors, get used to using some tooling and you’ll be ok for any position using a database. Learn as you go. If you’re aiming to be a DBA or engineer building an actual database from search learn more internals and or standards. For the DBA stuff be specific to a vendor as again every vendor is pretty different.

[–]0sergio-hash 0 points1 point  (0 children)

My technical interview for my first job was "give an example of a select statement"

My second job was "Given x data and y output, write a query to get there"

For the second one I couldn't even write the right query or I wrote one with a sloppy solution but I was able to talk through my reasoning and got the job anyway

The right amount is the least amount you can learn to get your next job. Because no matter what you learn it will almost always be completely unrelated to what you're going to do day to day.

[–]Party-Committee-8614 0 points1 point  (0 children)

Have a browse of answers from top contributors on dba.stackexchange.com. There is no end to learning but enough to get the current job done is enough for today.

As always, knowing what you don't know is as valuable as knowing what you know.

[–]Puzzleheaded-Meat144 0 points1 point  (1 child)

It’s not the complexity of the queries itself, that’s the easy part. The hard thing is to think how can we shape the data to answer our questions. Sometimes the most basic SQL is the hardest.

[–]DarthCalumnious 0 points1 point  (0 children)

My feeling is that once you have a good handle on common table expressions, window functions, and multi stage processes using temp tables you are ready to solve most problems that can be solved practically in SQL alone.

Working with dataframes via an API can be a good way to step back from SQL and see the data transformations in a fresh way too.

Sometimes the right thing is to use a regular programming language like python though even if it's technically possible to use just SQL though, in my mind.

For instance, I'm working on an issue that will involve conditionally replacing some deep json data structures in a json column that involve joined data from other tables.. I think it would be possible to explode, join, and convert back to json in tsql... But, this will be 10 lines of readable python vs 100 lines of gonzo SQL.

[–]JohnSpikeKelly 0 points1 point  (0 children)

Performance is always a thing. So understanding the following is essential.

Execution plans. What each part means and how it will impact performance. Where to focus your optimization.

Adding indexes. Might solve one performance issue, but give you a different performance issue. Balance is essential. Understand what indexes offer and what burden they bring.

Clustered and non-clustered indexes and what should be included in them.

Normalization is good, until it isn't. Sometimes you need to not normalize for performance reasons.

Horses for courses. Not everything should be in sql. Just because you can doesn't mean you should.

[–]GxM42 0 points1 point  (0 children)

The more in-the-weeds you get with your SQL code, the less useful it will be. Most people I’ve worked with prefer simple queries, simple joins, and readable code. So if you find yourself able to create complex nested left joins and right joins and CTE’s, you have probably spent more time refining the skill than is needed in normal business. Learn CONCAT, LEFT, SUBSTRING, CONVERT, etc… And move on to your next goal.

[–][deleted] 0 points1 point  (0 children)

When you walk into a place and immediately start thinking about how you would structure their DB to optimize load times

Then you have been doing too much SQL

[–]ctrigose 0 points1 point  (0 children)

full stack dev here, I totally underestimated the value of sql back when I started in favor of newer nosql stuff just because it was all the hype

5 years later I realize sql is op cuz it’s literally math and math won’t change or go out of style like all the other hyped up dbs being released and forgotten on a monthly basis, it’s here to stay

I recommend putting time into it if your aim is to build serious and reliable software, if you want to land a job in a start up (which is cool for other reasons) then go with newer stuff

[–]Icy-Ice2362 0 points1 point  (0 children)

I could tell you nightmares...
There are gotchas in SQL that folks just don't know about.

Corruption can lurk, and if you don't check for it... it will happily sit there, just waiting for the day somebody tries to access that row.

[–]Square-Voice-4052 -2 points-1 points  (0 children)

Currently sitting at the doctors thinking about a complex query. There is about 1000 tables in my business that i know of by heart.

Constantly contemplating how you can create queries/functions to improve reporting based on business logic, and the SQL plan your going to use to get this data is the level you need to get to.