Here are the seven things I wish I knew before learning SQL. Number one, SQL is incredibly easy and insanely complex at the same time. And let me explain. SQL is like an iceberg. In fact, there is a famous SQL meme with an iceberg with the different layers of SQL that you could possibly learn in your data career. And honestly, the first half, the first little bit of the iceberg is really easy to learn. The commands that you need to learn as a data analyst are really not that hard to learn. They're easy to get a hold of eventually and there's really only 17 of them that you need to know. We'll talk about those here in a second. But the crazy thing is it's also insanely complex. There's like a bajillion different commands you could know in SQL and there's so many different levels and layers to it. There's a bunch of stuff that I don't even know. So, for example, if we look at this iceberg meme right here, like you'll see that the easy things are at the top, the order by and the group by and the limit and the null and joins and stuff like that. And then it gets more and more complex as you go down. Like for instance, even in the third layer, lateral joins, I've never even used lateral joins. Cursors, never use those as well. Triggers, I have used a little bit. But my point here is it goes so far down where it's like in this second to last layer down here like where the narwhal I don't even know any of that at all. So my point here is you can make it like me senior data analyst who's worked in the field for 10 years who teaches people data analytics and you could not even scratch the surface of SQL and that's perfectly okay because I know the first two to three decently well the first two at least. And it solves like I would say 90% of data analyst problems and we'll actually talk about that here in a second. what is a SQL problem or a data problem that someone a data analyst actually solves with SQL because not all of SQL commands are made for data analysts. So in my opinion if you're just getting started you can get by with like 17 SQL commands and they are the following. Ready? Number one select. Number two from number three where number four group by. Number five order by number six like number seven count. Number eight, max and min. Uh, number nine, average. Number 10, sum. Number 11, case when. Number 12, join. Number 13, distinct. Number 14, having. Number 15 with, number 16, partition by, and number seven, uh, 17, concat. Now, there's some other ones you possibly could use as well, like union is another one that probably is used pretty often. Um, maybe you could ar argue like some sort of rank would be useful um or some sort of like date function or something like that. But my point here is there's really not that much to get started with. Like if you can get those 17 things down, you can land a day job 100%. And I honestly think you can learn those 17 things in like three weeks if I'm being honest. And that's how fast I teach them inside of my boot camp. You know, I run data Alex accelerator. It's a boot camp. We teach SQL and we do it in two weeks, the SQL portion. And I think that's good enough to land your first day at a job if I'm being honest. Now, that's about 30 hours of work probably, but I literally think if you spend 30 hours on this, you can learn it pretty easily. By the way, if you found this list helpful, I send out a weekly newsletter with tips just like this. And you can join 30,000 other aspiring data analysts to get these weekly tips in your email at datacareerjumpster. com/newsletter or there is a link in the show notes down below. But sign up because I send awesome stuff like this every single week. That actually brings me to my second point, which is that you don't have to have all your SQL syntax memorized. It's basically impossible. Like I showed you, there are so many different commands that you could be learning, using. And you might be using Excel, Tableau, you might be using PowerBI, might be using Python, all on top of SQL as well. And those have different syntaxes. And so it's really hard to remember all the different syntaxes. So you don't have to have it memorized. It's not a problem if you forget. I forget all the freaking time. It happens. nearly like every day to be honest. Probably more than I should tell you guys on YouTube. But I'm forgetful. I've never been a good memorizer. And the cool thing is you don't ne you definitely don't have to have it memorized for the job, right? When you're at the job, there's not like someone over your shoulder like making sure you know how to do this. Now, you should obviously know the basics. That's a given. Like select from group by those where those types of things. You should definitely know the backbone of SQL probably by heart or by hand. Um, but like the more complex stuff, the more syntaxy stuff, you definitely don't have to know. Um, where this might not be true is in an interview. In an interview, for some reason in the data world, we just love to, "Hey, do you have this memorized? " No, you suck. You're never going to get hired. You reject you. Like, that's just how it is. I don't know why it is. I hate interviews like that, but there are some SQL interviews that do kind of treat you that way. I think it's basically like if you don't know that, you don't know enough to do the job. But I don't agree with that interview process, but that's just how it is. So just telling you that to be prepared. Uh especially in today with like a lot of these editors that will actually like kind of uh fill in
Segment 2 (05:00 - 10:00)
the syntax for you or suggest syntax for you with chatgbt with claude with Google like you really can figure out what you need to do or how to do what you want to do in a moment's notice. And so memorization the need for it is just going down. I don't think you need to be memorizing something and you shouldn't feel bad if you don't have things memorized. Number three, there's actually a ton of beginner SQL commands that you may learn in an online tutorial that are absolutely useless and you should really never use them or rather you won't use them in your career. And the reason is data analysts we do a lot with databases, right? But really most the time I'd say 90% of the time we don't actually create, alter, or delete databases. We aren't really managing databases. We're querying databases which querying is a funny word. It basically means you're asking questions to the data. That's your job as data analyst is to query the data in the database. And so really data engineers, data architects, uh maybe an analytics engineer, their job is to more create the database structure and everything like that. Your job as data analyst is just to answer business questions with the data that they provide you. And so there's certain things and certain tutorials that will tell you that you need to know some commands like insert or delete or update, grant or provoke. And you don't need to know those. those at all. Um that's like more data engineering. And they often call those DCL and DML, which stands for data control language and data manipulation language. And basically, in my opinion, you don't need those at all within SQL if you're going to be a data analyst. At least not at the beginning. Like, don't waste your time. And I'm telling you, if you go to if you like Google SQL tutorial, one of the first things they're going to teach you is like, okay, this is how you create a table. delete update a row. Do insert into to populate your database. And those are good things to know. I'm not saying like that's a bad thing to know. I'm just saying if you're in a crunch for time, which we all are today, and if you're a career pivot, you don't have unlimited time. So, you have to figure out what to spend your time on. And I'm telling you, I wish I wouldn't have spent time on this. Fourth thing I wish I knew when I was starting SQL is that you actually don't even really have to know SQL. Now, SQL is really in demand. Like, it is the most in demand data tool out there across all the different data disciplines. That being said is like everything that you can do in SQL, you can kind of get away with in some other data software. So for example, a group by in SQL is really just a pivot table in Excel. And you can do the exact same manipulation inside of pandas as well with a group by function there. You can join Excel tables. You can join Google Sheets. Tableau and PowerBI both have a bunch of noode data manipulation tools built into their softwares so that you can actually do like a bunch of data manipulation that you could do in SQL inside of their softwares without having to write SQL code. I really think you should learn SQL. I think it's worth your time. But that being said, just know that you can do everything that you can do in SQL in a different software. So if you're an Excel master, you can probably figure out how to do whatever you need to do to the data that you would do in SQL inside of Excel. You don't have to learn every single data tool, and if you try, you're going to be like a 100 years old before you actually ever feel ready to apply to any job. My point here is just don't feel that bad if you don't know SQL, but you should probably learn it anyways. Tip number five is that you need to have an IDE. And an IDE stands for integrated development environment. And what does that stand for? Well, when I was first like breaking into data, I knew software. I knew Excel for example. Uh, and when you download Excel, you hit download Excel and then you can, you know, click on Excel and it opens up Excel and then you can analyze data inside of Excel. Well, SQL is a little bit more complicated than that. First off, there's not just like one software that's called SQL and you hit download on SQL. There's a bunch of different flavors and different like sublanguages of SQL. Um the more popular ones are MySQL, SQL light, Microsoft SQL Server. Um Snowflake's becoming more popular. Uh but my point in telling you this, if you were to download, for instance, MySQL, you wouldn't be able to just like double click it and it would open up and you can analyze data in SQL. You need what's called an IDE or often in SQL's called a workbench. And basically this is like a secondary or like a companion software that comes with the actual download of SQL that lets you use it in a non-terminal non-scary coder way. So just know when you're going to download SQL uh you probably need to download some sort of an IDE or some sort of a workbench for you to be able to use it. And that's a little bit confusing and a little bit difficult to set up. This is one of the reasons why when I teach SQL inside of the data analytics accelerator we actually do the first week without downloading an ID or even downloading anything. We actually just uh use a SQL version inside of the cloud that allows you to just get the hang of SQL of the actual language before you have to deal with like the annoying logistics of downloading and installing because that's a pain in the butt always. I've done it like literally hundred times and I hate downloading SQL every single time I do. It's a pain in the butt. Just trust me, it's not fun. But hey, if I went back and I could tell myself one thing, I'd be, hey, you need an ID. If you're just going to try to do it without an ID, it's not going to work. That brings me to my sixth tip and that is that you need to use the limit function in SQL. So if you run a SQL query, SQL will give you back all the matching rows that match your query. And
Segment 3 (10:00 - 12:00)
a lot of times if you're using a big database, that could be, you know, it could be five rows, but it could also be 50 rows, it could be 500 5,000 rows, it could be 500,000 rows, it could be 5 million rows. If you're trying to return five million rows, it's going to take a long time to return that. uh especially if you're maybe not the best at optimizing queries and stuff like that. So my advice to you is to make sure you're using the limit at the end and that will actually like if you do limit to 10 that will only give you the first 10 out of the five million. So that way you can test your queries first you know on a smaller result base so it's fast and then once you're sure that the queries kind of work the way that you want you can take that limit from you know 10 to 100 to 1,000 and then you can make sure everything's still working the way that you want but you don't have to wait very long. The seventh thing I wish I knew is that getting good at SQL doesn't equate to actually getting hired. Because a lot of you guys probably watching this right now are applying data jobs and you're getting rejected. You're not even getting like an interview, right? And you're like, "Oh man, I just got to get better at SQL. " And it's like, why? Why do you think that? You You're probably already proficient enough at SQL. Or if you're not, like I said, you can get there in like a month. So, if you're going to go like, you know, hit leak code really hard or just like practice SQL problems, that's not going to equate to landing a job. It's just not because right now you're not getting rejected because you're not good at SQL. You're getting rejected for some other reason. Probably that your resume and your LinkedIn aren't good. Um, and so really when it comes down to it, SQL is just like maybe 115th of landing your first data job. In my opinion, it's just one-third. It's just a skill, right? So, I have this method. It's called the Espin method. Skills, portfolio, network. You need all three to land a data job. Most people are just focused on the S part, the skill part. And SQL is just one part of the S part. So it's like 115th of the whole equation. And if you're just focusing on SQL, you're missing out on so much more like your portfolio, your projects, your networking, your cold messaging, your resume, your LinkedIn. And so it's important to get good at SQL. Yes, I will give you that. But it's also important not just get stuck in the grind of doing these SQL problems over and over again thinking that's somehow going to magically get you a job because it's honestly not. And if you do want to know what's going to get you a job, it's actually following the full SPN method. So that's of interest to you if you've never heard of the SPN method before. I will have a link down below to learn about the SPN method. And I also have a link to my boot camp which literally will teach you how to become a data analyst from wherever you're at to landing your first data job following the SPN method step by step with instructors, with peers, and a lot of fun. So, hope to see you guys