6 ms·
Show HN: SQL Trainer – Learn SQL by doing live data exercises
- michaelmior 8y agoThis is nice, but it's unfortunate that it starts off with commands specific to MySQL.
- tole42 8y agoi.e. "You may limit number of records using LIMIT keyword"
- arendtio 8y agoIs there an alternative (like a command to list all tables and which works on all DBMS)? I mean using a specific sqlite/oracle/tsql/... command wouldn't be any better.
- michaelmior 8y agoNo, there isn't. But I don't see the need to start with these commands anyway. Or if the OP really feels like that's a necessary starting point, it would be great to have an option in the future to select what DBMS you're using. I wasn't intending to bash the work, but sticking to a single DBMS really limits the utility of what seems like it could be very general resource.
- arendtio 8y agoI like the idea of being able to select which dialect one wants to learn and maybe a table listing the most prominent differences (like LIMIT vs. TOP) at the end, would be nice too.
- bdarnell 8y agoIn theory `information_schema` is supposed to be universal, so you could do `select table_name from information_schema.tables`. However, getting useful information out of `information_schema` tends to require fairly complex queries and still has quirks and differences between databases.
- moolcool 8y agoPretty nice! It would be cool if this also had some basic joins added as well.
- SnowingXIV 8y agoAgreed, just add a few more steps to do joins as that's probably one of the most common requests that people need to do. Even providing a few basic inner or left joins could be enough.
- codeulike 8y agoNo joins? Its a bit trivial then. Otoh, explaining joins is pretty complicated compared to the basics. This 'Late Payment Email generator' by same person is pretty good : ) I hate figuring out how to write those https://app.bytescout.com/generate-payment-reminder-email/generate-payment-reminder-email.html https://app.bytescout.com/generate-payment-reminder-email/ge...
- eumm 8y agojoins will be added soon!
- eumm 8y agoJOIN excercise added. https://app.bytescout.com/sql-trainer/index.html https://app.bytescout.com/sql-trainer/index.html
- tomca32 8y agoI like this, but as mentioned, it's a shame that it starts of with a MySQL specific command, SHOW tables
- eumm 8y agothanks for the feedback! Will change it
- Double_a_92 8y agoThis is another one I found a couple of weeks ago: https://selectstarsql.com/ https://selectstarsql.com/
- zebrafish 8y agoIt would be nice if I could hit continue from the keyboard so that I could do the whole tutorial without using the mouse.
- pedrosorio 8y agohttps://vimium.github.io/ https://vimium.github.io/
- gravy 8y agoYou can tab to the continue button
- voltagex_ 8y agotab tab enter will do it, but yes, they might want to add a handler for enter in the text input.
- mettamage 8y agoI learned everything from: sqlteaching.com It was created in a hackathon and uses sql.js, you can also create your own exercises through sql.js if you know a thing or two about web development ;)
- rhc2104 8y agoSQL Teaching itself is also open source! https://github.com/rhc2104/sqlteaching https://github.com/rhc2104/sqlteaching (Creator of SQL Teaching)
- pier25 8y agoThis is great. I'm mostly a front end dev and my SQL is rather poor...
- cneumuel 8y agoFor Oracle, there is https://livesql.oracle.com https://livesql.oracle.com
- evo_9 8y agoHere is another: https://sqlbolt.com https://sqlbolt.com
- eumm 8y agoHi, My name is Eugene and we made this little online SQL language trainer to help non-programmers to learn basic SQL queries. And more important, it shows the result of query entered. Any suggestions and comments are welcome! and many thanks for all the suggestion already made! And seems like we should better remove MySQL specific command from the very first question.
- evo_9 8y agoMaybe not remove it but perhaps have a choice of SQL 'flavor'. That would be very useful, aka user chooses Oracle, MySQL, MS-SQL, etc.
- kevinjoling 8y agoNice! Would love to see this, but for complex queries.
- rolleiflex 8y agoHey Eugene! In the last question, it seems you can get the same result by doing top 3, or limit 3, but only limit 3 is accepted as valid. You might either want to, if there's a valid reason for the distinction (execution order?), want to highlight as the difference between top and limit, or if there isn't, accept both.
- eumm 8y agothanks for the suggestion! yes, definitely will need to update the way it checks for correct answer as there can be multiple variations.
- z3t4 8y agoMake sure it's virtualized/sandboxed, SQL basically guarantees HDD write access.
- jhspetersson 8y agoI like this one very much: http://sql-ex.ru/ http://sql-ex.ru/ Major part of questions is based on MS SQL Server though.
- knight17 8y agoSome other similar tools I added to my notes from a similar thread: https://news.ycombinator.com/item?id=17905666 https://news.ycombinator.com/item?id=17905666 Interactive PostgreSQL SQL Tutorial - https://chartio.com/learn/sql/ https://chartio.com/learn/sql/ Select STAR SQL - https://selectstarsql.com/ https://selectstarsql.com/ SQL Bolt - https://sqlbolt.com/ https://sqlbolt.com/ - Learn SQL with simple, interactive exercises SQL Window functions - https://www.windowfunctions.com/ https://www.windowfunctions.com/ PostgreSQL Exercises - https://pgexercises.com/ https://pgexercises.com/ SQL Zoo - http://sqlzoo.net/ http://sqlzoo.net/ SQL Teaching - https://www.sqlteaching.com/ https://www.sqlteaching.com/
- ris 8y agoAlso GalaXQL http://sol.gfxile.net/g3/ http://sol.gfxile.net/g3/
- oneweekwonder 8y agoSchemaverse - https://schemaverse.com/ https://schemaverse.com/ - The Schemaverse is a space-based strategy game implemented entirely within a PostgreSQL database.
- pmart123 8y agoI saw that before. It's pretty crazy.
- ris 8y agoSomething that all of these tools (?) are missing are tutorials around concurrency, allowing multiple sessions to be in progress, interfering with each others operation. TBH this is an under-taught area of databases in general. I have vague ideas about building a browser-based tool that allowed the user to queue up operations to be performed in order in multiple concurrent database sessions, allowing exact locking & blocking behaviour to be experimented with, but have never had time to work on this.
- konsumer 8y agoNice! I like the tutorial format. I made this along similar lines: http://konsumer.js.org/learnsql/ http://konsumer.js.org/learnsql/
- bytematic 8y agoThis is great, lots of my classes are using textbooks similar to this. On (13) "Please type SQL query to get 3 largest orders from orders table", it doesn't really tell you what column to order the results by.
- SMV279438 8y agoJust to toot my own horn - I wrote a book called SQL Practice Problems (available on Amazon), plus I also have an expanded problem set on my website SQLPracticeProblem.com. The framework for the problems is that you get the problem statement, the expected results, and then you figure out how to write the SQL to get the results. I have lots of hints if you get stuck, but there's also a hint-free version, which some people prefer. It really helps for people who like a "learn-by-doing" approach.
- zachguo 8y agoLooks cool. But in my experience, theoretical understanding and some simple proofs are quite important in mastering SQL. I would suggest the intro to DB online course offered by Stanford.
- eumm 8y agothanks for the suggestion! I found the the theory can work great after some doing. Stanford course looks great for this purpose!
- eumm 8y agodiscussion on Product Hunt: https://www.producthunt.com/posts/bytescout-sql-trainer https://www.producthunt.com/posts/bytescout-sql-trainer
- paulddraper 8y ago> In some popular databases like MySQL and others you may get the list of available tables just by typing: SHOW TABLES; Is there any database other than MySQL that does that?
- trevz 8y agoWould be cool if you didn't have to use your mouse so much. Kept having to click the next box to select it.