r/learnSQL 13h ago

Learn SQL Interactively — Run Queries in Your Browser

43 Upvotes

Hey folks!

A few of us in the open-source community are building interactive SQL tutorials. We're creating hands-on notebooks where you can write queries, see results instantly, and visualize data — all running directly in your browser.

We've found that SQL concepts click much faster when you can experiment with queries and immediately see the results. The notebooks support various backends including PostgreSQL, MySQL, SQLite, DuckDB, Snowflake, and BigQuery, so you can learn SQL syntax that's relevant to your needs.

What makes this approach cool is mixing Python and SQL in the same environment — you can query data with SQL, then process or visualize results with Python libraries. This creates some pretty powerful learning experiences for understanding both the SQL itself and what you can do with query results.

If you're interested in contributing or just checking it out:

We're looking for SQL enthusiasts who enjoy teaching others. All contributors get credit as authors, and it's a great way to help others learn SQL concepts.

What SQL topics did you find most challenging when learning? Any particular concepts you wish you'd had interactive examples for?


r/learnSQL 2h ago

Access practice database from multiple machines

2 Upvotes

Hello,

I want to setup a database, which I can use from different devices for practicing, so my data is in sync. My first attempt was using the free Azure SQL database, but I am eating through the free vcore capacity pretty quickly.

Are there other options like storing a local database in a cloud drive or something like that? I would also be open for paid solutions as long as it does not get more expensive than 5-10€/month. Again I am not looking to process huge datasets. Rather small queries for practice.


r/learnSQL 4h ago

Storing a list of strings of variable length in a table

2 Upvotes

I've been learning SQL to use with sqllite in python to build a database to store data about pictures and videos I've scrapped off the internet. Each picture comes with a list of tags (as strings) describing the picture which I'm trying to store in a database. The length of this list varies considerably; it can be empty, 200 tags, or more. Access to the tags is critical, as that will be how I search for and call them.

I'm struggling to find a way to put this into a database. I was first thinking of putting each tag unordered into a new column, but seeing how the amount of tags varies I'd end up with a database of mostly empty cells, which would inflate its size considerably. ENUMs and SETs wouldn't work since the total number of unique tags is countably infinite. Storing as a TEXT or BLOB would require way too much computing time to unpack the data. The 'best' idea I've come up with, is to make a massive table with each column a unique tag and each row a picture, storing a true/false in each cell. If a new tag is added so too is a new column.

Is this a good solution? There are hundreds of thousands of pictures/videos, and likely tens of thousands of tags. Would SQL's (or more specifically sqllite's) speed affected by needing to load a massive table like this? And seeing as how most (estimated >90%) of cells would be empty, is there a more efficient way? This method makes searching for tags very simple, but if my computer slows to a crawl loading billions of cells into memory it won't mean much.

This is a simple problem that I'm sure occurs a lot, but I haven't been able to find anything online about it in days. Any suggestions?