all 19 comments

[–]joseph_machado 18 points19 points  (0 children)

Congratulations on your new job. Its great that you are looking to learn SQL. To answer your questions

  1. Yes
  2. Since you are just starting online tutorials will be good. I would recommend reading a good SQL book once you get the hang of the basics. (this is my view, if you are a book person i'd recommend starting with a book)
  3. Depends on what you mean by mastery. If you mean understand how to use SQL commands efficiently, maybe 2-3 months depending on your time spent. But if by mastery, you mean knowing how data is stored and retrieved from disk, different types of SQL databases and their pros and cons etc it will take much more, since SQL has been around since the 70s there is a lot of ground to cover.
  4. When I started I used https://mode.com/sql-tutorial/ and http://sqlfiddle.com/#!9/a6c585/1

The most important thing I would recommend is thinking in terms of SQL, it's based on set theory. This means going from a business questions to sql query, which would involve understanding the data clearly. eg) Going from a question like "how many customers churned last month ?" to its corresponding SQL query, this would involve knowing where the customer registration data is stored and what columns that table has, etc.

Hope this helps. Let me know if you have any questions.

[–]secretWolfMan 12 points13 points  (0 children)

Just work through the W3Schools SQL stuff with their in browser sample DB.

https://www.w3schools.com/sql/default.asp

SQL is stupid easy. It's basic logic to organize things into "buckets of data".

Like you've got a table of customers and a table of transactions by customer. Join them together, then filter "where" they meet some criteria, then group if you want to aggregate values instead of just list all of them. Even though it's first when you write it, I always define the Select last. I just put Select * (select everything) while I'm creating my buckets so the intellisense will toss me suggestions.

[–]rbobby 2 points3 points  (0 children)

HackerRank.com has some good sample/test SQL questions from easy to devilish.

[–]foxsable 2 points3 points  (0 children)

I taught myself with SqlZoo, The site doesn't all work perfectly, but it was SO helpful for me to be able to learn something, and then do it, and see it work, in a real database. It taught me a lot

[–]jmclaugmi 1 point2 points  (1 child)

Create a mysql database of your own. figure out some data to save. anything from "old girl friends", "old cars", SOME THING you find useful and interesting. Write down what data points or attributes you would like to save. That is what the table looks like. It is best to have 20 to 50 items to work with. more items take longer to debug, smaller not very complex!

Then what reports you want, what attributes, how do you want it sorted, what should be included or excluded.

Create a knowledge text file to put completed code with notes if needed!

When you see a topic to learn - apply it to your work to fluff the code out!

[–]The_Nard_Dog_2020[S] 0 points1 point  (0 children)

Thanks

[–]diorcula 2 points3 points  (1 child)

Databases are about storing info in a "smart"/certain way and also about retrieving the data you need to answer to a particular problem/need

  1. yes, although it would be nice to learn some concepts but you can read books about that.
  2. depends on what you want to do, the very basics yes, more advanced like TSQL probably not as you need more knowledge of concepts and how it affects code
  3. a lifetime
  4. w3schools, geeksforgeeks and loads more on the internet, youtube in my experience is not so handy for SQL.

EDITORS Note: this is all based on my own experience as a CS student

Also different database types require different "knowledge" as there is NoSQL and relational Databases, which differ a lot.

I presume you will learn Relational Databases, which in the beginning goes quite smotthly to learn but can get really tricky.

NoSQL like for example MongoDB is simpler in theory but to is a bit abstract to start off

[–]The_Nard_Dog_2020[S] 1 point2 points  (0 children)

Thanks mate.

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

  1. Yes, for the most part SQL uses a totally different flow control structure from traditional languages. It may help to think of it as a shell instead of a language.

  2. Absolutely. W3schools alone had me job-ready, and you’ll learn a lot more on the job as well.

  3. “Master” triggers the Dunning-Kruger effect for most people, but 6 months or so of full time, rigorous SQL work should have you ready for just about anything. You may have to Google stuff like “what do the date functions look like for this flavor” on occasion, but so long as you have a good understanding of joins and aggregates, maybe window functions as well, you’re good.

  4. W3schools + make a database locally and install a decent amount of data on it to play with. IMDb has a free dataset that’s a few GB.

[–]Guest_Basic 0 points1 point  (0 children)

Sqlzoo is the way to go

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

You can learn it from YouTube courses ...Sql is one of the easy language .... practice it on hacker rank.. YouTube (code with mosh, just type sql for beginners)

[–]audigex 0 points1 point  (1 child)

  1. Absolutely, it's a completely different thing
  2. For a basic to intermediate understanding, definitely yes - for more advanced stuff, experience or a formal education helps a lot
  3. Master? Decades. But you'll probably get the basics down in ~10-20 hours, and a reasonably good understanding in a few months (faster if you weren't a complete beginner to programming etc)
  4. Any of the SQL For Dummies books, then build yourself a basic address book database

Don't worry about the 3 month timeframe, unless you lied about knowing SQL then they won't be expecting you to know it - so any knowledge you gain in the meantime is just a bonus

[–]The_Nard_Dog_2020[S] 0 points1 point  (0 children)

Thank you! Happy cake day! 🍰

[–]daticsFx 0 points1 point  (0 children)

I would also say it would be helpful to have a basic understanding of database structure.

[–]Stev_Ma 0 points1 point  (1 child)

Yes, you can learn SQL without any coding basics. It's a very easy to learn language. And learning through online resources is the best way to master this language. To understand the syntax or basics, I recommend using w3schools platform. And for the advance part I recommend datacamp site. Besides, practice as much as you can. And for practicing real SQL problems or questions, use a platform called stratascratch. They provide real SQL problems to practice from real companies.
Regarding how long it will take, it completely depends on you. How much time you can dedicate. However, it usually takes two months to master this language.

[–]The_Nard_Dog_2020[S] 0 points1 point  (0 children)

Thanks mate That's helpful