9
votes
Recommendations to learn SQL?
I read the AskReddit thread on "What costs less than $100 that changed your life?" (link unavailable since I'm at work) but someone responded "SQL" - jobs just open up that make a ton of money.
I did a cursory search on Indeed and holy moly they were right -- SQL jobs get easily 2x what I make now. I'm pretty good at Excel and that sort of thinking, so I was thinking I'd try taking a class.
Do yall have any recommendations as to a good course to take in SQL, preferably online, preferably free or cheap? I'm willing to pay a bit if it'll mean I can make a lot more, but I'm currently not making a ton, haha.
Any responses welcome, including ideas as to how to break into like, tech-oriented fields as well.
I'm just going to be "that guy" and tell you to RTFM.
In all seriousness, pick a database and read the manual, and for each chapter try to implement what you've learned. Pretty much every database I've ever used has excellent documentation. Though that being said, there are two glaring exceptions to the list of databases that I have used - Oracle and IBM DB2. There are a lot of people who dislike these databases, but because of that you might have better luck finding jobs with companies who are using them. Doubly so if you invest in certification. Techs who tinker with MySQL are a dime a dozen but Oracle certified DBAs are self-evidently valuable.
I would suggest if you have a computer with Windows on it that you might start off with Microsoft SQL. There's a free version you can try out with all of their management tools, it's pretty easy to use, and it's got some fairly advanced features behind it that you are likely to find in production environments even if they are not using MSSQL.
I should mention that there are a few things that you will likely not learn from the manuals that are very valuable to know, but they are actually very simple concepts. Depending on exactly what job you are looking for, you might not even need to know them. But here's the shortlist:
Of course, there are many other things you will eventually learn with practice, many of which will be dependent on the database you end up learning.
Yes, that would be the way to get on the path of really learning a database well and maybe eventually being a database administrator, but a lot of people need to learn a little bit of SQL for part of their job and that can be very valuable too, without necessarily deciding to change careers. Which is why so many people do it.
The basics are the same everywhere and to begin with, you don't necessarily need to get too deep into the details, which is why I suggested some online environments to start. Beyond that, every database vendor has their own dialect of SQL and you usually end up learning whatever your company uses.
It's somewhat rare to write an application to work with more than one database vendor, but at one time I had a job adapting a Java tool to work with several different kinds of databases. I found learning DB2 to be especially weird because the IBM manuals, while pretty comprehensive, were written in their own dialect of computerese from the mainframe era. But that was before Google and Stack Overflow.
These days in the open source and startup worlds, PostgreSQL is the default choice. It is what Tildes uses, for example. Microsoft SQL is common in Windows shops, and if you're starting from Excel maybe that makes the most sense. I would be a bit worried that specializing in Oracle or DB2 would be limiting yourself to large, stodgy old companies, and Oracle especially has a terrible reputation that goes way back. But sure, there are people who make a career of it.
I wrote my comment with the assumption that @acdw was looking to get a job as a DBA or something similar, where you are going to need that in-depth information that is going to be specific to the specific DBMS you are using. But yes, if you are just going to do something adjacent you certainly don't need to know everything. Heck, half the time you don't even need to actually need SQL, like when your data is being managed by an ORM or through an API.
I absolutely adore Postgres, and I would certainly encourage anyone to use it for most projects - especially if it's an open-source project. But there are many shops still running MySQL and a surprising number of them with MariaDB. I mention Oracle and DB2 specifically because @acdw was interested in learning SQL for making money and you're probably going to be able to get the highest paychecks administering these databases. But of course, the best way to figure out where to start is probably just to look at what the job market is like - especially if they want to work locally at an office.
maybe one day ... but I honestly didn't even think about titles or anything like that, or even what the landscape looked like. I could probably start with basic info to get my feet wet then transition into manuals for specific software.
Thanks for the names of all these! They're good to know.
Adding on to this, the disadvantage of learning SQL "from the book" is a common one when you're learning SQL: you don't have a database to practice on.
There are luckily a lot of online tutorials that provide you with a toy database to use as you progress (datacamp and codeacademy both have it I believe). I'd recommend "getting your hands dirty" rather than getting too bogged down with some of the more academic points (relational algebra, etc.) if you want to know just enough SQL to be dangerous.
Someone also compiled this excellent list of publicly available datasets: https://github.com/awesomedata/awesome-public-datasets
There's no better example than real-world examples, after all.
Honestly, thanks! I honestly didn't even think about how databases have manuals telling you how to use them. So RTFM is great advice :)
The bullet points you provided are also great for a beginner, so thank you!
It's been many years since I learned SQL in school, so I don't know what online courses are available. But an alternate route might be to read a few tutorials and try it out online? Here are a couple of websites that will let you play with SQL queries:
https://www.w3schools.com/sql/trysql.asp?filename=trysql_asc
http://sqlfiddle.com/
W3 is a good place to start with the basics. @acdw, I would also highly recommend installing a local copy of mysql and downloading public data and using public data sets to create queries to cement it. It frankly doesn't take a very long time to learn, but practice on some of the basics is necessary to get a job most places as the questions they'll ask you during a tech screen are fairly basic to anyone who's programmed in SQL but almost always go over the heads of people who only learned it from a manual.
If you'd like I could also share the basic concepts from the questions we use on our tech screen.
Great advice, thank you!
Yes please, if it's not too much trouble :)
Primer: We have a test database. Many of our questions start with a given set of SQL and people are asked to fix it rather than write out SQL from scratch. People often assume (incorrectly) that portions of the SQL are just done correctly, such as the joins themselves.
Basic concepts:
Generally speaking we don't get too complicated on the actual tech screen, and concepts which I would consider advanced are asked in a free-form style during the on-site interviews. The above is usually more than adequate enough to understand how well someone grasps SQL and how much they have worked with it. We encourage our participants to explain what they are doing while they are doing it and are watching their screens as they actually type in the answers - this gives us insight into what they try first, how they debug problems, etc.
Thanks so much for the write-up! It gives me a great idea of the kinds of things to look for when studying.
Cheers and good luck. Happy to answer any questions you might have along the way.
I don't have any personal experience with the book, and it's definitely not a recommendation for everyone (I checked whether you've posted in ~anime), but I've seen quite a few positive opinions of The Manga Guide to Databases. It seems like it teaches the fundamentals in a more interesting way than a lot of other options.
This is a good book to read. I highly recommend reading this if you want a fun introduction to databases.
Put it on hold at the library yesterday, and it's already in! I'm going to start on this tonight :)
Thanks!
These are great! Thank you :) I'm really excited for the story.
I have used this resource in the past:
http://sol.gfxile.net/g3/#
I also completed Datacamp a year ago (although I wouldn't recommend them now due to the claims of toxic leadership). There are also courses on Udemy that you could use.
Can you elaborate on the toxic leadership? I have a subscription to them I pay through my work that I very occasionally use to slowly learn python and brush up on my R, but would like to know if I should take my corporate training money elsewhere for good reason.
There was an alleged sexual harassment incident by the CEO that was covered up. I say "alleged" because I don't really know much about it. However, I have seen a lot of people move from datacamp to dataquest.io specifically because of that incident. I bought DQ licenses for people in my org and have been pretty happy with it.
But for learning SQL alone, I don't think you need to fork out for a subscription. The best way to learn SQL is to pick a data project that you're interested in, install SQLite, and work through a SQL primer online with your data. Having a project that you enjoy will lead you to the things you need to learn.
Thanks for the info, good to know. Datacamp subscription just renewed so I will probably wait till next year to change it over.
Apparently they had some sexual harassment issues that they were trying to obfuscate:
https://www.buzzfeednews.com/article/daveyalba/datacamp-sexual-harassment-metoo-tech-startup
Thanks for this link, it provides a lot of distinct details. They definitely handled this poorly. I'll take my money elsewhere in the future. That being said, I was imagining it would likely be a lot worse than it was (these situations are often more than one person speaking up about being sexually harassed).
So I'll begin by saying that I'm no expert, but I come from an on again off again hobbyist systems programming background and recently have had the privilege of working on a really cool project which is significantly dependent on a PostgreSQL back-end. I've dabbled with some simple SQL queries in the past when fooling around with software like message boards or wikis, but this has been my first experience working at a level where I'm actually designing APIs, figuring out the best way to organize and store records in the database, and dealing with a (modestly) significant set of live and growing production data.
This has put me in daily contact with a couple top notch professionals who have experience administrating exponentially larger databases at their day jobs and the amount of knowledge I have picked up over the past four weeks has been incredible.
To be clear, I'm still a weenie with much to learn, but what I think is important to emphasize is that a lot of the SQL tutorials out there have you operating on what is essentially dead data, meanwhile live databases are constantly changing and evolving in their workloads, bottlenecks, and functional requirements. If you can get the chance to work with live data, or speak with people who do, or even idle in an IRC/Matrix channel of an open source project dealing with database systems, it can open up a whole new world compared to the bland tutorials where you query a table of cities to see which states contain a city with a certain name.
Thanks for this take! It's one of those things where, now that you've said it, I'm like, "duh!" But I hadn't thought of it before now. I'll probably learn the basics on dead data and then do as you suggest, thank you!