Ask HN: What is the best online resource to learn advanced SQL?
448 pointsI too often find myself getting stuck when it comes to more advanced SQL queries. I have never actively learnt SQL and realise that I don't have a great mental model of how it works. I would like to improve this as it is killing my productivity from time to time.
Comments (97) 45 threads
Earlier comments[1] https://schemaverse.com/
It doesn't necessarily teach each advanced technique, but it does give you a good place to practice what you've learned.
(Thanks for the mention!)
The Try SQL course is free, the other 2 you have to pay for. https://www.codeschool.com/courses/try-sql
That will get you pretty far but the advanced SQL topics will require the study of what the underlying database provides and how it works. Every database is different in terms of how it implements advanced features, if at all. For example, MySQL doesn't have window functions. For postgres related topics, the documentation is excellent, postgresguide.com gives a high level overview, or you can follow craig's blog (http://www.craigkerstiens.com/) that provides a gentle introduction to many of these topics as well.
Whenever I do come across blogs that have good articles we aim to feature them in Postgres Weekly, so if you want a regular stream of that type of content it's worth checking out - http://www.postgresweekly.com
https://www.amazon.com/SQL-Antipatterns-Programming-Pragmati...
But as you said, you haven't actively learned SQL, so probably need to find some free data sets to work with.
You can probably start with Data is Plural. That will, at least, give you some raw data sets so you can get started on learning how to build up a database from unorganized data first:
https://tinyletter.com/data-is-plural
Edit to add: First and foremost, you have to learn normalization. Without that, you aren't doing any SQL.
All comments shown.
Couldn't load more comments. Check your connection and try again.