hey everyone ! Any pointers to improve complex SQL problems other than Hackerrank and Leet Code
Brute force. Just interview for positions you won’t accept. I’ve never found a good resource that had SQL interview questions. The ones that do are easy. I got really good by trial and error in interviews.
Most of the big companies won’t ask super advanced sql even for senior data scientist roles. Leetcode medium DB section, maybe some of the harder that should be medium, is all you need
I didn’t even know complex SQL practice problems existed. I’m honestly not sure how you’d do it since: A. Optimization is super vendor-specific like someone else said. B. The hardest part of SQL isnt syntax but knowing where the data lives and the intricacies of those specific tables and how they map to other tables. Production DBs are a result of a lot of moving parts and years of accumulated neglect... I’m not sure you could even intentionally recreate that if you tried. Even if you could, tough to expect a candidate to suss that out in the span of an interview. Personally the hardest SQL question I’ve ever been asked was implementing a window function and this was just talking out how I’d query something against a hypothetical table, not actually firing anything.
The HackerRank SQL Questions are more "algorithm" in nature. They're really weird, nothing like you'd ever see on the job. LeetCode has SQL questions that make sense, table joins, aggregations, window functions, CTEs vs SubQueries, top n, return 3rd highest, etc.
India
Yesterday
798
Any Indians Think Kashmir Should be Independent?
India
7h
2110
Why is it so G*damn difficult to move money out of India
Tech Industry
Yesterday
2628
I do tech screens at Google. AMA
AMA
Yesterday
2061
I have worked at TikTok US core tech for 3 years. AMA.
Tech Industry
2d
2239
NW required for "fuck you money"
Beyond that all you've got is query optimization and db vendor specific things. Vendor specific features don't tend to matter too much in interviews. Optimization is a pretty out there topic and most people don't know what to do with it past indexing. Just read about indices and know how to create one, you'll be fine.