I had a bit of experience my freshmen year of college by working on a personal project that I abandoned. When I got hired as a SQL Developer with little experience. I got a rundown on my employers database and tables and then tried my best. Google and Stack was the best teacher and with each work assignment I learned something new or a better way to do what I did before. Often the SQL queries I wrote would require up…
Ask HN: Junior SQL developers – How do you learn SQL?
11–20 of 46 posts
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#12I'm not a junior, but my best learning came from real examples in my first role. Then when I had some experience, researching advanced functions such as window functions and CTEs, AKA the result of answering "why does this query take ten minutes to run and how do I optimize it?"
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#13There is a book on ANSI SQL that I've used: https://www.amazon.com/SQL-Complete-Reference-James-Groff/dp...
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#14Not so much about how I learned but how I teach. Whenever I want to explain how one can do things in SQL I pull up a google/excel sheet and write down some sample data that resembles the problem. When multiple tables are involved I just write the samples in two different locations within the same sheet. After that I can just jot down the resulting table below (without writing the actual sheet commands) and maybe some…
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#15(1) I was starting with Oracle, so I read through Oracle's Database Concepts (https://docs.oracle.com/cd/B19306_01/server.102/b14220/toc.h...). This contains unnecessarily deep technical detail (which I skimmed), but I learn more easily if I have a strong footing in the concepts so I don't feel disoriented. For example, it was helpful to understand transactions (section 4), undo (section 3), and the data dictionary (section 7; later made it easier to understanding the DDL / DML distinction), consistency (section 13). It also contains an overview of some important SQL concepts in section 24 such as cursors and the fact that there's an optimizer which figures out how to run your query.
(2) I read about database normalization. Understanding how to put things in first, second, and third normal forms was extremely helpful in reshaping how I think of data structures. Learning to use a database is not just about how to write a query. It's also about how to model data. (What does relational, as in relational database, mean anyway?) Even if you're not creating tables, understanding how they are probably organized helps you query them. And once you understand basic modeling stuff like normalization, you can move on to advanced stuff like denormalization. Another part of modeling is keys (natural vs. surrogate/synthetic keys, composite keys, foreign keys, etc.).
(3) I practiced writing SQL queries and learned all the joins, aggregate functions, analytic functions, etc.
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#16I had a bit of experience my freshmen year of college by working on a personal project that I abandoned. When I got hired as a SQL Developer with little experience. I got a rundown on my employers database and tables and then tried my best. Google and Stack was the best teacher and with each work assignment I learned something new or a better way to do what I did before. Often the SQL queries I wrote would require up…
Thanks for sharing this. You are saying that there is a ton of stuff to learn....how do you solve this problem now?
I never make it a task to know completely what a language could do. I just try to familiarize my self with the basics (syntax) it’s novelty features (the reason why it even exists as opposed to other solutions) and pray what I think the best solution for a given problem is doable via research (Google & Stackoverflow)
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#17Re: Ask HN: Junior SQL developers – How do you learn SQL?
#18Postgres documentation: https://www.postgresql.org/docs/
Being forced to solve a challenging problem keeps me going regardless of what it is. I am not a huge fan of exercises without an end result.
Re: Ask HN: Junior SQL developers – How do you learn SQL?
#19https://sqlbolt.com/ and then https://sqlzoo.net/ were great places for me to start.