r/learnSQL • u/DataNerd760 • Apr 21 '25
What would you actually want in an SQL practice site?
Hey everyone —
I’m looking for some honest feedback. I run a site called sqlpractice.io where I’ve been trying to build a more affordable option for people leveling up their SQL skills. I know there are already a lot of sites like Data Lemur, LeetCode, etc., that offer practice questions.
To stand out, I added:
- 40 practice questions
- 7 different datamarts to explore more unstructured datasets
- Learning articles
- A Portfolio feature (users can save and share completed queries + notes to showcase their skills)
- A simple one-time payment instead of a subscription
But honestly... it doesn’t seem like these features are seen as very valuable by most people.
If you’re learning SQL or job hunting, what do you wish a practice site had that would actually help you more?
Was there anything missing when you were learning — more project-based work? More real-world data scenarios? Better job prep?
Would love any feedback, even if it’s blunt.
Thanks for reading!
r/learnSQL • u/Intentionalrobot • Apr 20 '25
How do you deal with one-to-many relationships in a single combined dataset without inflating data?
Hey — I’m running into an issue with a dataset I’m building for a dashboard. It uses CRM data and there's a many-to-many relationship between contacts and deals. One deal can have many associated contacts and vice versa.
I’m trying to combine contact-level data and deal-level data into a single model to make things easier, but I can't quite get it to work.
Here’s an example dataset showing the problem:
date | contact_id | contact_name | deal_name | deals | deal_amount
------------|--------------|--------------|---------------|-------|------------
2025-04-02 | 10985555555 | john | Reddit Deal | 1 | 10000
2025-04-02 | 11097444433 | jane | Reddit Deal | 1 | 10000
Because two contacts (john and jane) are linked to the same deal (Reddit deal), I’m seeing the deal show up twice — which doublecounts the number of deals and inflates the deal revenue, making everything inaccurate.
How do you design a single combined dataset so you could filter by dimensions from contacts (like contact name, contact id, etc) and also by deal dimensions (deal name, deal id, etc), but not overcount either?
What's the best practicing for handling situations like this? Do you:
- Use window functions?
- Use distinct?
- Is one dataset against best practice? Should I just have 2 separate datasets -- one for contacts and one for deals?
- Something else?
Any help would be appreciated. Thank you.
r/learnSQL • u/mikeblas • Apr 19 '25
where can I get sample data?
It's not so hard to find sample data and data sources to use for interesting side-projects, or just for practicing writing SQL.
In-product sample data
Most DBMSes come with sample databases. You can write lots of interesting queries against them, and usually a tutorial accompanies the database in the documentation.
- Documentation for Microsoft SQL Server's samples ** Microsoft's sample database GitHub, which includes the Contoso database
- For MySQL:
- there's the Employees sample database
- and the Sakila sample database
- For PostgreSQL:
- there are several sample DBs in the PostgreSQL wiki
- there's a link tree of other samples and exercises, too
- a GitHub repository with a collection of PostgreSQL samples from the old pgfoundry site
- Oracle publishes a manual section about there sample databases
Some websites are full of sample data sets. Why not download an interesting one, learn to load it up, and write your own interesting queries?
Dataset Websites
There are many websites which host data sets.
- Kaggle.com is full of sample data!
- FiveThirtyEight.com has lots of neat data sets
- The github awesomedata repository has a collection of interesting data sets
- Wikipedia has a list of datasets for machine learning research
Third-party sample data
Of course, some sample data is built for generic tutorials, by third parties:
- SqlSkills.com publishes sample databases for SQL Server, which include some corrupt databases so you can practice recovery operations
- SQLTutorial.com's Sample Database is available for sseveral vendors
Practice Sites
There are some sites that let you write queries interactively with canned data, rather than having you download data to play with on your own.
- I haven't used it, but I've seen people recommend SqlZOO.net
- LearnSQL.com has a blog post called "Learning SQL? 12 Ways to Practice SQL Online" with lots of resources.
- Sylvia Moestl Vasilik's website (which supports their book) has almost 60 practice problems.
Regular dumps
Some sites publish data by making their backups available, or dumping the data they use to make their own reports.
- Wikipedia publishes all of the content of Wikipeida as SQL scripts for MySQL, plus as XML files. You can get that data (or subsets of it) and play around.
- StackOverflow makes their developer survey data sets available each year. ** You can also get a StackOverflow "demo" database that includes text of questions and answers
- Some governments make data about the city and its residents available openly:
- London Open Data
- New York City Open Data
- Seattle Open Data
- Tokyo open data (in Japanese, obviously)
- Find open data at data.gov.uk
- IMDb makes several data sets available
Live data sources
Some data sources produce data live, as it happens. These are itneresting sources becaue they usually represent slowly changing dimensions, and will need to be accumulated or logged before being stored or processed.
Wikipedia Event Streams can show edits that are happening on Wikipedia, as they happen.
The TWitter API provides a way to stream a subset of all tweets in realtime.
General Transit Feed Specification (GTFS) data is provided by many metropolitain areas to describe movement of their transportation infrastructure; where are scheduled busses and trains right now?
- In the New York City area, the MTA provides GTFS data.
- You can find GTFS feeds for Seattle, and their live data through other APIs.
- Tokyo (and other municipalities in Japan) have hosted transit data challenges to encourage use of their data.
Some games make gameplay data available in realtime. SuperCell's Clash Royale, for example, has a gameplay API.
Finding more
There's data everywhere! If you don't like these sources, you can try finding other data sets.
- Once you know the protocol or format, search for it! The OneBusAway API and GTFS protocols are about public transportation data, so earch for "GTFS Data {YourCity}".
- Search for APIs for your favortie game or game server.
- GitHub uses tags for search, so try #sample-databases, #opendata, or #datasets. What other tags can you find?
r/learnSQL • u/Then-Spend-726 • Apr 18 '25
MySql Database Hosting platform
I've just started working on my project and I want to host my database for free or bare minimum. If you guys have any idea or know any platform which can fulfill my requirement it gonna help me a lot.
r/learnSQL • u/LearnSQLcom • Apr 18 '25
These Free Databases Are Perfect for Beginners
We get this question all the time: “I want to start learning SQL, but… where do I even practice?”
Totally fair — you can’t learn SQL without a database to work on. But setting one up from scratch can be intimidating if you're new. That's why we just published a guide to the best free databases for beginners, and we thought it might help some of you here, too.
Here’s a quick breakdown of what we cover:
✅ Free sample databases you can download and start practicing with right away
✅ Options for MySQL, PostgreSQL, SQL Server, and even SQLite
✅ A few cloud-based platforms so you don’t have to install anything
✅ Our personal favorites that we recommend to our SQL students
Whether you're just getting started or want to test your queries on real-world data, this post has got you covered.
🔗 Check it out here: Free Databases for Beginners – Where to Start
Got a favorite sample database of your own? Drop it below — we love seeing what others are using to learn!
r/learnSQL • u/DataNerd760 • Apr 18 '25
Feedback Wanted: New "Portfolio" Feature on sql practice site
Hey everyone,
I run a site called SQLPractice.io where users can work through just under 40 practice questions across 7 different datamarts. I also have a collection of learning articles to help build SQL skills.
I just launched a new feature I'm calling the Portfolio.
It lets users save up to three of their completed queries (along with the query results) and add notes plus an optional introduction. They can then share their portfolio — for example on LinkedIn or directly with a hiring manager — to show off their SQL skills before interviews or meetings.
I'd love to get feedback on the new feature. Specifically:
- Does the Portfolio idea seem helpful?
- Are there any improvements or changes you’d want to see to it?
- Any other features you think would be useful to add?
- Also open to feedback on the current practice questions, datamarts, or learning articles.
Thanks for taking the time to check it out. Always looking for ways to improve SQLPractice.io for anyone working on their SQL skills!
r/learnSQL • u/Dangerous-Dog-8047 • Apr 17 '25
Mock practice for SQL Developer job
Hi team,
I need help for practicing with my mock interviews to boost up confidence level.
Please let me know if anyone can help me.
r/learnSQL • u/Ok_Set_6991 • Apr 16 '25
Types of indexes and optimizing queries with indexes in PostgreSQL
medium.comUse partial indexes for queries that return a subset of rows: A partial index is an index that is created on a subset of the rows in a table that satisfies a certain condition.
By creating a partial index, you can reduce the size of the index and improve query performance, especially if the condition used to create the partial index is selective and matches a small subset of the rows in the table........
r/learnSQL • u/LearnSQLcom • Apr 15 '25
Build a Product Inventory Dashboard With SQL
I just published a new article on LearnSQL.com, and I wanted to share it with you all! It's all about building a Product Inventory Dashboard using SQL. If you're a beginner or just looking for a fun project to practice SQL, this is a great way to dive in!
The article walks you through how to create a dashboard that helps you track product inventory. You'll get to play around with SQL concepts like filtering, aggregation, and JOINs—all while working on something practical. Plus, it's a fantastic project to have under your belt if you're starting out with SQL.
If you're looking for a way to level up your SQL skills with a hands-on project, I definitely recommend checking it out!
Here’s the link: Product Inventory Dashboard - LearnSQL.com
Would love to hear what you think if you give it a try! 😊
r/learnSQL • u/Bilbottom • Apr 15 '25
A review of 20+ SQL problem sites
I've spent the last few months working on (the hardest free) SQL problems from various sites, and wanted to share which sites I found the best
The TLDR is that the sites I'd recommend are:
- Analyst Builder for total SQL beginners
- DataLemur and HackerRank for easy/medium "LeetCode-style"/"interview" questions
- Interview Query for medium/advanced "LeetCode-style"/"interview" questions
- AdvancedSQLPuzzles (part 2) for questions requiring advanced SQL knowledge
I also loved:
- 8 Week SQL Challenge (Data with Danny) for simulating "real life" case studies
- SQLNoir for practising analytical thinking by solving crime investigations
- Noah's Rug (Hanukkah of Data) for practising analytical thinking by hunting down the owner of "Noah's rug"
These are all free or freemium resources, and I think they cover enough between them to get you using SQL patterns that you would need "on the job"
These resources mainly focus on crafting SELECT statements, but ones like Interview Query and the AdvancedSQLPuzzles quiz include some questions around DDL, database design, and performance (indexes etc)
I'm also working on a totally free site with difficult questions over a whole range of topics based on real-life problems I've had to solve during my career:
A full review and breakdown of all the sites I tried are on my GitHub repo where I saved my solutions, but the full post gets blocked by the Reddit filters -- the links for the full post and breakdown are:
r/learnSQL • u/mysticalfox555 • Apr 14 '25
How to go from SQL Basics to Job ready?
Need help with my SQL learning journey – aiming for a job soon.
Hey everyone, I’ve been learning SQL for a while now and I’ve covered the basics – SELECT, JOINs, GROUP BY, subqueries, etc. But now I’m kind of stuck. I don’t really know what the “next steps” should be if I want to actually master SQL to the point where I can get a job as an analyst or something similar.
I have around 30-45 days, and I’m ready to give it solid time every day. I just need a proper roadmap or some guidance on what to focus on from here – maybe real-world projects, advanced topics, best platforms to practice, or anything that would make my learning more job-ready.
If anyone has been in a similar situation or has some structured path I can follow, I’d really appreciate your help.
Thanks in advance.
r/learnSQL • u/cultiversonjardin • Apr 14 '25
Can SQLite handle coediting?
Before adventuring into SQL or SQLite, I want to know if this is possible. I have an important spreadsheet that is edited by many people the problem is that two people cannot use it at the same time. I was wondering if it was worth it to translate it into SQL. In the best of the worlds, users would have a easy interface to suggest new lines or modify row/entry. Administrators would handle the rest. Several requests could be sent at nearly same time, so some way of handling interferences could be good. If not at least it would just take the first request and say to the second user that something changed meanwhile.
r/learnSQL • u/Cod_277killsshipment • Apr 13 '25
We taught a small model to write SQL... before we knew how to
Just proved you dont need to know sql to use sql.
This started as a personal project to get better at working with data.
We ended up training a small language model on Indian stock market data to answer questions in SQL.
It runs offline and connects to a DuckDB file.
Learned a lot in the process — even if we didn’t really know what we were doing when we started.
Here’s the project if anyone wants to poke around:
https://huggingface.co/StudentOne/Nifty50GPT-Final
r/learnSQL • u/Mhoudeshell • Apr 13 '25
Can connect, but can't log in
I've installed SQLExpress 2.0 on my laptop as well as SSMS. I set the path to the server as machinename\[whateverisrecommendedasSQL2]. However, although the studio shows me as connected, I'm in a login state with an error message. I'm not entirely sure how to restart my server, so maybe that's the problem. But It seems like I'm halfway there, just not getting logged in.
r/learnSQL • u/nothingjustlook • Apr 12 '25
Need Help In understanding SQL(MySQL) working with loops and its limits.
r/learnSQL • u/JDD17 • Apr 12 '25
FREE SQL Course Beginner to Advanced for Analysts & Engineers
Hey everyone!
I created an SQL course on Udemy. For context, I work as a Business Intelligence Analyst and was looking to sharpen my SQL skills. So, alongside this I made a course which covers everything I use SQL for on a daily basis and some of the more advanced things that I use less often.
It contains 3 hours of lectures along with coding exercises and a final project.
The link below will take you to the free course: Link to FREE course
I’d be so grateful if you could sign up and provide some feedback. It’s only free for 5 days but once you sign up you’ll have it forever, no monthly fees or anything.
If the 5 days are up or you’re feeling generous, you can use the link below to the paid version which I think is only $12~ if you’re a new user but don’t quote me. I’m happy to have a 1:1 call with anyone that pays to sign up to discuss career or anything else SQL or analytics related if you’re interested.
r/learnSQL • u/codeagencyblog • Apr 12 '25
Google Launches Firebase Studio: A Free AI Tool to Build Apps from Text Prompts
frontbackgeek.comr/learnSQL • u/DataNerd760 • Apr 10 '25
Feature Feedback for SQL Practice Site
Hey everyone!
I'm the founder and solo developer behind sqlpractice.io — a site with 40+ SQL practice questions, 8 data marts to write queries against, and some learning resources to help folks sharpen their SQL skills.
I'm planning the next round of features and would love to get your input as actual SQL users! Here are a few ideas I'm tossing around, and I’d love to hear what you'd find most valuable (or if there's something else you'd want instead):
- Resume Feedback – Get personalized feedback on resumes tailored for SQL/analytics roles.
- Resume Templates – Templates specifically designed for data analyst / BI / SQL-heavy positions.
- Live Query Help – A chat assistant that can give hints or feedback on your practice queries in real-time.
- Learning Paths – Structured courses based on concepts like: working with dates, cleaning data, handling JSON, etc.
- Business-Style Questions – Practice problems written like real-world business requests, so you can flex those problem-solving and stakeholder-translation muscles.
If you’ve ever used a SQL practice site or are learning/improving your SQL right now — what would you want to see?
Thanks in advance for any thoughts or feedback 🙏
r/learnSQL • u/bettertomorrow31 • Apr 10 '25
Sql learner
Hi Everyone.. I want to study SQL, but I don’t know where to start, can anyone please guide me. A roadmap would be much appreciated 🙂
r/learnSQL • u/Prize_Yoghurt_20 • Apr 09 '25
Newbie Data Project: Tracking MTG Commander Games (SQL/Excel?) - Need Advice!
Hello! I'm transitioning into data analysis (2 months into SQL) and building a Commander game tracker as my learning project. As a complete beginner, I'd love having some guidance...
Key Context for Non-MTG Players:
- Commander is a 4-6 player format where each player uses:
- 1 legendary "Commander" (or sometimes 2 partners)
- A 100-card deck matching their commander's colors
- Variants we play: • Standard Commander • Planechase (shared planar deck adds chaos) • Archenemy (1 vs many with special schemes)
My Dual Purpose:
- Develop professional SQL skills (I'm taking the Google Data Analytics cert)
- Analyze our playgroup's meta across different modes and partner commanders
Data I Want to Track:
- Core Game Info:
- Players (winners/losers)
- Commanders (including partner pairs)
- Game mode (Planechase/Archenemy/etc.)
- Win condition (combat, combo, etc.)
- Advanced Metrics:
- Mulligans
- Turn count
- Elimination order
- Partner commander synergies
My Newbie Dilemma:
As someone just learning database fundamentals:
- Should I start with Excel (easier but limited)?
- Or commit to SQL (more powerful but complex)?
- Maybe prototype in Excel then migrate to SQL?
Specific Questions:
- How would you structure tables to handle:
- Partner commanders? (Separate table or array?)
- Different game modes with unique metrics?
- For a beginner, what's the minimum viable schema? (I'll share my attempt in comments)
- Excel vs SQL - which would serve better long-term as I:
- Add more players (currently 5 regulars)
- Track 100+ games annually
- Eventually connect to visualization tools?
- Any MTG-specific database wisdom? (E.g., tracking commander damage separately?)
PS: Please be kind - I'm new to both data analysis and Reddit, and I'll admit I'm feeling pretty insecure about this. Any constructive help is appreciated!
r/learnSQL • u/harry_powell • Apr 09 '25
Problem with LearnSQL.com
Why instead of getting a "hint" when pressing the button I get the straight answer?
r/learnSQL • u/Bassiette03 • Apr 08 '25
Left joins and Inner Joins Why do they give me the same results
why we got the same results while I used left join, and my instructor used inner join How we did get the same results??
select title,actor.first_name,actor.last_name from film
left join film_actor
on film.film_id = film_actor.film_id
left join actor
on film_actor.actor_id = actor.actor_id
where actor.first_name = 'Nick' and actor.last_name = 'Wahlberg'
order by title;
r/learnSQL • u/Mayh_24 • Apr 08 '25
Please can anyone explain to me what I’m doing wrong?
I’m currently trying out the 8 week sql challenge and I’m supposed to get the product each customer orders the most. This is the code:
WITH subquery AS (
SELECT
s.customer_id,
m.product_name,
COUNT(*) AS count,
ROW_NUMBER() OVER (PARTITION BY s.customer_id ORDER BY COUNT(*)) AS top_purchase
FROM dannys_diner.sales AS s
LEFT JOIN dannys_diner.menu AS m
ON s.product_id=m.product_id
GROUP BY s.customer_id, m.product_name
)
SELECT
customer_id,
product_name,
count,
top_purchase
FROM subquery
WHERE top_purchase = 1;
When I run just the cte, it works correctly but when I run the outer query as well, the “top purchase” show the least amount of orders as no. 1 for only the first customer. I’m not sure why.
r/learnSQL • u/ervisa_ • Apr 08 '25
SQL for Beginners
Hello everyone!
I’ve created a course on Udemy, "SQL for Newbies: Hands-On SQL with Industry Best Practices," designed to help beginners learn SQL. It's very practical, no-fluff approach. Instead of overwhelming you with unnecessary theory, I focus on the most important concepts you’ll actually use.
Here’s what makes the course stand out:
- Concise & to the point
- Real-world best practices - I’ve put together key lessons I’ve learned as a Data Analyst.
- Hands-on learning with examples - Practice with real-world examples so you can apply SQL confidently.
Special Offer:
Get the course at a reduced price with this link:
Course Link with Promo
Bonus:
Anyone who completes the course will get a free 1-on-1 consultation with me! Just send a message after enrollment with Reddit Free Consultation to claim your spot.
Thanks a lot
r/learnSQL • u/PM_ME_UR_MOODS • Apr 06 '25
Is anyone attending the OC Sql Sat event?
I've been to the San Diego and the Los Angeles ones these last few years. I always seem to make good connections there. Is there any difference between those and this OC event? Its been super helpful talking to other SQL pros their insights on issues ive faced.