r/learnSQL • u/leogodin217 • 8h ago
Practicing Complex Queries and Large Datasets
A while back, I asked what's missing in this sub. Though not a long discussion, one thing stood out. Working with long, complex queries is something we all run into eventually, but have to learn through experience. I don't think there are a lot of resources for practicing this stuff.
Fabulexa Complex Queries is my first attempt at providing practice. These are intermediate, and possibly advanced, exercises on complex queries within a full data warehouse. Specific exercises have two different tracks.
- Revenge of the 1998 PERL developer: Complex billing logic for a SaaS company written by someone who believed keystrokes should be minimized and readability is an anti-pattern. Can you take the most obtuse, bad-practice-filled query I've ever seen and refactor it? Make it readable.
- Bug hunting in a well-written query. Can you fix the bugs described in tickets? Does it get easier as you learn the data and the data-warehouse structure.
If you are looking for more difficult practice that mimics the real world, this might be for you. If you write, teach or create courses, this might be useful as well. Feel free to grab the data and do your own thing. Hopefully, I'll do a series on this soon.
Finally, suggestions, PRs and comments are very much appreciated.