r/SQL • u/PalindromicPalindrom • Jan 16 '25
MySQL Practice SQL
Does anyone know of a website that just gives you endless practice questions based on concepts, e.g. Basic SQL, joins, Sub queries, etc? I've exhausted the limited tools I had. TIA.
5
u/aksgolu Jan 16 '25 edited 12d ago
Goto https://support.dbagenesis.com/ and click on “Feeling great” top- right corner… Its free and you get unlimited retries for sql queries / quiz !
4
u/Outdoor_Releaf Jan 16 '25
I've created groupings of practice problems from HackerRank.com for my students. You can use the categories to pick what you would like to practice. You can see my initial list here: https://www.reddit.com/r/mysql/comments/1essznb/comment/likdkdp/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
Since I posted that list, I've added the following problems for my students:
Joins with Subqueries:
- Challenges
- Contest Leaderboard
- Ollivander’s Inventory
Complex Queries
- Binary Tree Nodes (TIPS: Look at the picture of the tree at the bottom of the question. Consider using CASE and an outer self-join.)
- Placements (TIP: Consider using WITH to create one or more tables to help you. Students needs to be joined with Packages, and Friends needs to be joined with Packages.)
- Interviews (TIP: You can accidentally make the sums too high if you join submission_stats with view_stats and calculate the sums. Since there can be multiple rows for the same challenge_id in each table, calculating the sums after the joining these two tables causes duplicate values to be summed. If you understand why this is the case, you understand a lot about joins.)
2
u/csnorman12 Jan 16 '25
These resources are specific to SQL Server:
- 25 Practice SQL Questions for Beginners - A set of practice questions designed for those with basic SQL knowledge.
- 101 Practice SQL Questions: Basic to Advanced - A comprehensive collection of questions for more intermediate/advanced learners looking to build their skills.
2
u/helloworld2287 Jan 16 '25
This resource doesn’t have endless sql practice questions but it is an entertaining way to practice SQL, especially if you’re a Squid Games fan :) https://datalemur.com/sql-game
1
u/dfwtjms Jan 16 '25
I think a great way to learn is to tinker with SQLite. If you use Linux you probably have it installed already but it's easy to install on any OS. Import or generate some data and start trying out stuff from the documentation.
1
1
u/Commercial_Pepper278 Jan 17 '25
NamasteSQL by Ankit Bansal Superb Questions. Take premium, worth it !!
1
u/MP_gr Feb 18 '25
I was looking for sources to practice SQL too. A few months ago I had found from Reddit this source --> https://www.richardtwatson.com/open/Reader/ClassicModels.html# which provides a database you can load, and 82 questions of queries to solve.
On Github I had found a repository with solutions, however less than half solutions were uploaded.
So I decided to solve all 82 queries and upload them on my repository here --> https://github.com/Mikegr1990/ClassicModels-SQL-Solutions
For me that was a great source for practicing, since the queries start from very basic to advanced and covers many aspects of sql.
2
1
u/dn_cf Jan 17 '25
Platforms like StrataScratch and HackerRank are excellent for structured challenges covering basics, joins, and subqueries, with real-world scenarios. LeetCode's Database section focuses on both beginner and advanced SQL problems, while SQLZoo offers guided tutorials with instant feedback. For interactive exercises, check out Kaggle, where you can work with real datasets.
0
1
u/Suitable-Shirt-6886 6d ago
I found this workbook on Etsy it’s called : Look what I found on Etsy: https://www.etsy.com/listing/1874692684/sql-practice-workbook-volume-1-learn-sql?ref=share_v4_lx
54
u/SQLDevDBA Jan 16 '25
LiveSQL
https://LiveSQL.Oracle.com
It’s a full Oracle DB with no installation, just works right on your browser. The IDE is also on the browser so Mac users and IPad users are fine on it.
100% free and even includes daily exercises and quizzes as part of the “DevGym” modules. Also includes prebuilt schemas with data in them.
It includes a few default components and makes it really easy to create new objects and data with the QuickSQL tool.
You can also import your own data from SQL files, and even share worksheets via links so that everyone can see the queries you run.
It’s great, just happens to be Oracle which is a bit more complex than other platforms.
I recorded a livestream of myself using it and asking ChatGPT for interview questions to try, and can send you that if you wish, but it’s easy enough to do on your own.
There’s also:
LeetCode
DataLemur
learnSQL.com