
Show HN: SQL Trainer – Learn SQL by doing live data exercises - eumm
https://app.bytescout.com/sql-trainer/index.html
======
knight17
Some 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/)

~~~
oneweekwonder
Schemaverse - [https://schemaverse.com/](https://schemaverse.com/) \- The
Schemaverse is a space-based strategy game implemented entirely within a
PostgreSQL database.

~~~
pmart123
I saw that before. It's pretty crazy.

------
eumm
Hi, 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.

~~~
rolleiflex
Hey 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
thanks for the suggestion! yes, definitely will need to update the way it
checks for correct answer as there can be multiple variations.

------
zebrafish
It would be nice if I could hit continue from the keyboard so that I could do
the whole tutorial without using the mouse.

~~~
pedrosorio
[https://vimium.github.io/](https://vimium.github.io/)

------
ris
Something 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.

------
Double_a_92
This is another one I found a couple of weeks ago:
[https://selectstarsql.com/](https://selectstarsql.com/)

------
michaelmior
This is nice, but it's unfortunate that it starts off with commands specific
to MySQL.

~~~
arendtio
Is 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
No, 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
I 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.

------
moolcool
Pretty nice! It would be cool if this also had some basic joins added as well.

~~~
eumm
JOIN excercise added. [https://app.bytescout.com/sql-
trainer/index.html](https://app.bytescout.com/sql-trainer/index.html)

------
evo_9
Here is another: [https://sqlbolt.com](https://sqlbolt.com)

------
bytematic
This 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.

------
mettamage
I 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
SQL Teaching itself is also open source!
[https://github.com/rhc2104/sqlteaching](https://github.com/rhc2104/sqlteaching)

(Creator of SQL Teaching)

------
SMV279438
Just 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.

------
tomca32
I like this, but as mentioned, it's a shame that it starts of with a MySQL
specific command, SHOW tables

~~~
eumm
thanks for the feedback! Will change it

~~~
ninju
Maybe just an _INFO_ block stating when a command is specific to a subset of
DB engines and/or limited in applicability

~~~
eumm
thanks! added info that it is available in MySQL only. MySQL is pretty popular
so this query can be good to know anyway.

------
pier25
This is great. I'm mostly a front end dev and my SQL is rather poor...

~~~
ediardo
This is common in front end devs. The higher you go in the stack the less you
worry about these operations.

------
konsumer
Nice! I like the tutorial format. I made this along similar lines:
[http://konsumer.js.org/learnsql/](http://konsumer.js.org/learnsql/)

------
zachguo
Looks 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
thanks for the suggestion! I found the the theory can work great after some
doing. Stanford course looks great for this purpose!

------
jhspetersson
I like this one very much: [http://sql-ex.ru/](http://sql-ex.ru/) Major part
of questions is based on MS SQL Server though.

------
paulddraper
> 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?

------
cneumuel
For Oracle, there is [https://livesql.oracle.com](https://livesql.oracle.com)

------
trevz
Would be cool if you didn't have to use your mouse so much. Kept having to
click the next box to select it.

------
eumm
discussion on Product Hunt: [https://www.producthunt.com/posts/bytescout-sql-
trainer](https://www.producthunt.com/posts/bytescout-sql-trainer)

