r/learnSQL • u/ManifestingPeace18 • Mar 05 '26
Databases to practice SQL
Hi, I haven't worked on SQL for last 2 years. I will rate 4 out 10 in SQL. But need to practice more to get in data analyst profile. Can you just sources where i can practice solving complex SQL problems?
101
Upvotes
16
u/SQLDevDBA Mar 05 '26 edited Mar 05 '26
Hey there, I made a quick video on this topic showcasing places where you can practice (free) online without downloads or installs, right in the browser with sample data already added.
Here’s a link to it, I’d go for the last 2 options in the video (Azure SQL DB Free tier and Oracle Live SQL). The links to the platforms are in the description.
40
u/vikrantk1995 Mar 05 '26
Hey, try datahelix.io, it’s completely free. Let me know what you think!
7
u/Massive_Show2963 Mar 05 '26
Microsoft's Northwind and Pubs databases have been used for a while as instructional databases.
See download from GitHub:
https://github.com/microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs
6
u/jgpatrick3 Mar 05 '26
Hard to beat SQLite3. Runs so much of the world already. So many great tools SQLite3, SQLiteStudio, Visidata, the original serverless system, core db for smart phones, software, embedded systems. Possibly the most deployed database in the world. I have gone from thinking of it as a toy to doing everything I can with it.
3
u/downshiftdata Mar 05 '26
https://archive.org/details/stackexchange
Analyze that. I'd start with https://archive.org/download/stackexchange/dba.stackexchange.com.7z. Import it into a database and go from there.
3
u/leogodin217 Mar 06 '26
I can generate datasets quickly with specific prescribed patterns and events. Something I've been working on for about eight months now. This one uses Duckdb and mimics ecommerce data. Still editing the practice exercises but, if you find it useful, let me know. Happy to create some more complex datasets in different domains.
https://github.com/leogodin217/sql-practice-retail/
3
u/uhhbhy Mar 06 '26
DVD rental was the best for me
1
u/Nbommersbach Mar 06 '26
It might worth looking at the AdventureWorks database:
https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver17&tabs=ssms
This site has some good practice exercises:
https://www.w3resource.com/sql-exercises/adventureworks/index.php
1
u/mikeblas Mar 17 '26
https://gist.github.com/mikeblas/8e3a7f7123fd73fd44d463e4d0ae57b4
Here is a huge curated list of sample data sets.
1
u/Academic-Vegetable-1 May 29 '26
Leetcode has SQL problems but they're pretty heavy on the interview grind side. for data analyst prep specifically, window functions are where most people get stuck so I'd weight that heavily. datadriven has SQL drills that are closer to real analyst work if you want something beyond basic joins.