10 ms·
SQLBolt – Interactive lessons and exercises to learn SQL
- nobody0 5y agoIn the same vein, https://selectstarsql.com/ https://selectstarsql.com/
- hakcermani 5y agoAnother good site to learn the basics and have some fun in the process .. has been on HN before .. is the SQL Murder Mystery ! https://mystery.knightlab.com/ https://mystery.knightlab.com/
- andreasha 5y agoFun tutorial! Some form of autocomplete would be nice.
- andreasha 5y agoLesson 14.3 accepts update without any where clause (set all rows) https://sqlbolt.com/lesson/updating_rows https://sqlbolt.com/lesson/updating_rows
- tifadg1 5y agovery useful - immediate feedback indicates a fresh approach to an old problem!
- marvel_boy 5y agoThanks a lot for this. It uses sqlite underneath?
- jmiskovic 5y agoApparently yes, sqlite running locally in your browser. https://old.reddit.com/r/webdev/comments/34h9i3/sqlbolt_interactive_sql_tutorials/cqunvh2/ https://old.reddit.com/r/webdev/comments/34h9i3/sqlbolt_inte...
- fouc 5y agoThe exercises are great, and I like that the feedback is quick, as soon as you solve it you get a checkmark and it's already ready for you to do the next exercise.
- karimf 5y agoThis might be one of the best example of Bret Victor - Inventing on Principle talk [0]. I wish there are a lot of tutorial or course with the same quality as this one. [0] https://www.youtube.com/watch?v=8QiPFmIMxFc https://www.youtube.com/watch?v=8QiPFmIMxFc. Original link on Vimeo is dead: https://vimeo.com/36579366 https://vimeo.com/36579366.
- Krizzu 5y agoGreat tool, definitely will come in handy
- mohanmca 5y agoThanks! Immediately sent to my friends who are learning SQL!
- wottan32 5y agoold but gold
- blowski 5y agoMy favorite book for learning SQL is “The Art of PostgreSQL”. https://theartofpostgresql.com/ https://theartofpostgresql.com/ I found the combination of real-world problems, general SQL advice, and the broad range of topics to be a really good book. It took my SQL from “the database is not much more than a place to persist application data” to “the application is not much more than a way to match commands to the database”. It’s amazing how much bespoke code is doing a job the database can do for you in a couple of lines.
- stouset 5y agoI haven’t read this yet but I love your take. Far too often do I see developers doing analytics by slurping an entire table across the network and performing calculations on it in the application. Of course it appears to work in development with tens of kilobytes of records and a local database, but as soon as it’s deployed to production it unleashes chaos. I consider myself very good at SQL but I do prefer to use ORMs for most things. However there’s no arguing that many of them have done a lot to obscure the incredible power inside a relational database, and perhaps go too far in hiding exactly when data is computed remotely vs. being pulled and operated on locally.
- blowski 5y agoI’m very guilty of all those sins. Select all, then use array map, reduce and filter in the app code. I could draw a line in my life where I discovered window functions.
- Cthulhu_ 5y agoIf the dataset is big enough, those operations actually do make sense because they can be translated to e.g. a Hadoop job - map / reduce / filter are all operations that don't depend on the sorting of a dataset, so in theory the dataset can be sharded across many machines. Of course, that is a solution to a problem that people wish they had. Relational databases can run multi-million row queries in seconds, and then there's BigTable / BigQuery which scales SQL to improbable scales.
- sparsely 5y agoNice and interactive, seems like a good place to start. Although the second question ("Find the director of each movie") does accept "SELECT title as director FROM movies;" as an answer.
- reedf1 5y agoI'm of the firm opinion that you can have a very successful career purely as an SQL genie.
- pantulis 5y agoSQL wizards are a rare bunch. It's not like the golden era of DBAs is going to come back, but as an upside SQL is the lingua franca of data engineering. So, yes. Disclosure: I write SQL queries just like Tarzan spoke English.
- Cthulhu_ 5y agoDBA's definitely used to have - still have? - a reputation as being paid big. They likely have a decent job in modern-day "big data" as well. Personally, unless there's a compelling reason, I'll stick to SQL for 'core' data storage. NoSQL is cute, but changing data structures over time is horror.
- bob1029 5y agoWe are trying to revive the art in our shop. Just got done building a really clean 3NF model for our problem domain and we are in the process of moving 100% of our custom configuration needs to SQL queries. From a biz strategy perspective, we can scale up a lot faster if all we need to do is find people who know (or can be taught) SQL. Consider the amount of time it would take to ramp someone on 1 SQL schema vs the entire C# ecosystem. For us, the application is quickly turning into a dumb funnel that just gets data and requirements (queries) into SQLite databases for eval. We put a web interface around all this so it can be easily managed on a per-customer basis. When everything is a SQL query, you can trivially export/import/clone customer configurations to rapidly bootstrap new ones.
- JamesSwift 5y agoThis is great if you have highly-connected client apps. Its not as doable when you can't guarantee connectivity. In those cases, you need to ship/duplicate business logic to the clients to work around the network issues. Its a hard problem.
- gigatexal 5y agoIf you can add a simple way to do proctored SQL questions for interviewing purposes that might be a good way to monetize this. Though, not everything needs to be monetized but if you wanted to it's an idea.
- sandGorgon 5y agoOne of the best paid courses here (if u want to train interns in ur co) is https://www.udemy.com/course/postgresqlmasterclass/ https://www.udemy.com/course/postgresqlmasterclass/ (created by Adnan Waheed - Founder of KlickAnalytics) https://www.udemy.com/course/postgresql-from-zero-to-hero/ https://www.udemy.com/course/postgresql-from-zero-to-hero/ (created by Will Bunker - founder of Match.com) Not too expensive ..but very very good.
- christophergs 5y agoYou can build your own site like this with CourseMaker[1] (disclaimer: I'm the founder). We don't have SQL support yet, but you can create interactive exercises with JS, Python, Go, Rust, C# and Java. I learned to code through these kinds of sites (codeacademy and code school especially), I think being able to tinker in the browser with no setup is great. [1] https://coursemaker.org https://coursemaker.org
- qwerty456127 5y agoSQL is both slightly ugly (which I attribute to the historical decision to use natural language words instead of the mathematical symbols of the relational algebra notation - the symbols make the expressions more readable once you learn them) and very beautiful. I'm sad most of the people have forgotten it and prefer to use ORMs today. Most often (except when coding a stupid low-feature phonebook/todolist tutorial) it seems to me writing SQL queries manually is a way more efficient (not only in terms of execution speed but also for developing) solution than using an ORM, except you have to have some fluency in SQL which the most of the today coders seem to lack. Designing a normalized entity-relation model as well as writing the queries for it also feels great, very satisfying.
- lolive 5y agoFrom what I remember, I used to write a lot of JPQL, when I had to to do some Hibernate stuff. isn't it standard way to use ORM? (or do people really traverse their connected objects, creating a load of n+1 select?)
- mritchie712 5y agoA little more detail on the history: https://twitter.com/mike_seekwell/status/1412777805759365120 https://twitter.com/mike_seekwell/status/1412777805759365120
- qwerty456127 5y ago> For people that complain about SQL being hard to read/write... it could have been worse. Thank you for the link. To me, however, this sounds like writing "ADD a TO b" instead of "a + b" and saying using the latter would be worse. Surely the former can be easier for a totally uneducated person to pick up immediately but as soon as you invest some humble time into learning the notation the latter becomes much easier to read than the former.
- mritchie712 5y agoSQL lets you do "a + b". The issue was with the notation, really hard to do that in a text editor.
- lolive 5y agoDo those lesson allow to learn only the relational tricks of SQL? or does it cover also for example hierarchical, recursive queries, etc?
- danielmarkbruce 5y agoFolks at Stripe recommend this internally and get a lot of people up and running doing analytics (even some lawyers...). It's pretty good.
- bGmSIDoSwMB 5y ago6qs8ebtnaXg6Yn
- bmn__ 5y agohttps://sqlzoo.net https://sqlzoo.net https://sqlteaching.com https://sqlteaching.com https://pgexercises.com https://pgexercises.com
- newprint 5y agoI'm surprised, no one mentioned https://www.sql-ex.ru/ https://www.sql-ex.ru/ It has few hundred graded SQL exercises (some of them are very hard) + there is a book http://www.sql-tutorial.ru/ http://www.sql-tutorial.ru/ that goes over most common errors from submissions. On top of that, there are competition problems with the leaderboard. On top of that, I highly advise everyone to read T-SQL Fundamentals, by Itzik Ben-Gan (and few other books by same author) and do the all exercises in the book.
- 8589934591 5y agoI guess we were just a few minutes apart in our comments. I have gone through the website and yes I highly recommend it.
- 8589934591 5y agoI recommend trying out https://www.sql-ex.ru https://www.sql-ex.ru which has some good exercises which can trip up a lot of people. I have used quite a few questions from here as an interviewer. Going through it completely is a solid foundation for tackling SQL at work. As a baseline, if one can solve https://www.jitbit.com/news/181-jitbits-sql-interview-questions/ https://www.jitbit.com/news/181-jitbits-sql-interview-questi... then you can be confident you can nail entry-mid level positions involving SQL.