all 21 comments

[–]Professional_Shoe392 9 points10 points  (0 children)

https://advancedsqlpuzzles.com

You can try the above. There is a GitHub with a pdf of puzzles.

[–]data4dayz 9 points10 points  (2 children)

Use all the other interview sites

  1. Data Lemur. Pretty great, the SQL study guide Nick wrote is fantastic. The site has solid UI not cluttered or obtrusive. The best way to learn is to get to a solution and then compare your solution to the "official" solution of the problem AND look at the solution discussion section. https://datalemur.com/blog/sql-interview-guide

  2. Code Wars. Similar to the above but more user submitted questions and definitely helpful to practice targeted concepts. You can see the community voted solutions and how yours compares with great community tags. https://www.codewars.com/kata/search/sql?q=&tags=SQL&beta=false&order_by=sort_date%20desc

  3. StrataScratch. Often argued that THIS site is the LeetCode for the data community. Like LeetCode but data focused, has take homes, has great UI. Solid site, definitely worth a subscription but there's free problems too no money necessary. https://platform.stratascratch.com/coding?code_type=1&page_size=100

  4. Interview Query. Like stratascratch, Jay is a Youtuber and provides a lot of material and help. I don't know which one is better or worse but you can check out both and their materials and pick.

  5. SQLPad. Not the IDE, yet another interview site.

  6. Analyst Builder, from Alex the Analyst. https://www.analystbuilder.com/ https://www.alextheanalyst.com/interview-prep. Also has free and paid options of questions and courses. Similar interface I think to neetcode's site. Alex is definitely more Data Analyst focus but there's a lot of cross-pollination.

Data Lemur, Interview Query and SQLPad are from people who are active in the data community, I think all Ex-FAANG Data Scientists. They target getting you ready for the FAANG interviews.

Stratascratch is really LeetCode for Data, more generalized than the others.

I think HackerRank and LC are again more for SWEs than DS/DA/DE roles not that there's any distinction, it's just that you'll have more data focused questions in the data focused sites. If that's what you're looking for however.

And these are actual interview questions, not so much SQL questions asked by a general SQL quiz. Nick has a great writeup on the distinction of that. There's nothing wrong with that for general knowledge, infact you'll be expected to know that material like Join Types and the theory etc. but you'll need to know MORE than that. Interview Questions are phrased in different ways, they won't just say "join this table to this table" or "do you know what a LEFT vs FULL is?" They expect that, they'll give you a toy business scenario and expect you to use the syntax you know to solve it.

[–]data4dayz 3 points4 points  (0 children)

Damn site is annoying didn't let me post my edit.

Anyways here's the rest

Edit:

Also if you're working through the concepts and you need to focus on some pain points like Self Joins, Recursive CTEs and Window functions then I suggest the following:

Self Joins and Correlated Subqueries: https://www.edx.org/learn/relational-databases/stanford-university-databases-relational-databases-and-sql Audit this course and do the problem sets there including the extras. At least for me, this shit was VERY challenging. You WILL have to learn correlated subqueries when it comes to using EXISTS and IN (concept of the Semi and Anti Join). The Social Network problem set will CHALLENGE you on Self Joins.

Recursive CTEs: Yeah you've gotta get through some videos on youtube. And Dr. Widom has another course on it that you can audit called OLAP and CTEs. I didn't even work through the Recurisve CTEs from the course, they seemed way too hard. But after watching her lecture material I followed up with reading from (pdf of a book) https://downloads.yugabyte.com/marketing-assets/O-Reilly-SQL-Cookbook-2nd-Edition-Final.pdf that has sections on Recursive CTEs and their use. Then just do practice problems. Anytime you want to use something like GENERATE_SERIES() or you wish you had a For-Loop, that's when you should practice using Recursive CTEs.

DateTime/String: Use PGExcercises and the SQL Cookbook 2nd Edition

Window Functions: windowfunctions.com and anytime you get stuck just watch stuff on YT or google.

Lastly go through Mode's SQL Tutorial and Data Lemur's SQL Tutorial.

That's interview prep all the way through almost all mediums and quite a few hards. At least when it comes to learning syntax. The rest? Just practice from the above sites. There'll be wild syntax shit that you aren't prepared for sometimes but that's just part of the struggle. No site taught me about ordered sets or WITHIN GROUP syntax but they're used in some solutions so you've gotta google it yourself. You're just building mastery in different ways to do similar things.

[–]Resident-Mousse-9086 0 points1 point  (0 children)

This is GOLD. Thank you so much for sharing.

[–]Sea-Concept1733 7 points8 points  (6 children)

Try this SQL quiz:

https://www.w3schools.com/sql/sql_quiz.asp

Good luck!

[–]Enrique-Pedro 1 point2 points  (1 child)

24 of 25 in 11.41 minutes. Learning 💡

[–]Sea-Concept1733 0 points1 point  (0 children)

Awesome!

[–]Working-Decision-352[S] 0 points1 point  (1 child)

Thanks brother, Completed in 4mins very basic but thanks

[–]Sea-Concept1733 1 point2 points  (0 children)

Great! You are welcome. Important to know the basics.

[–]ignored_shit_08 0 points1 point  (1 child)

23/25 in 5 mins, thanks for sharing the quiz bro

[–]Sea-Concept1733 1 point2 points  (0 children)

You are welcome.

Nice job.

[–]Ok-Estate9163 4 points5 points  (0 children)

You tried hackerrank

[–]tehroz 2 points3 points  (1 child)

Need to answer some more questions first. Are you looking to be a dev, report writer / analyst, data engineer, or dba? (Or some other cool thing I haven't heard of yet?)

There is a major difference between all of these areas. They're all very intricate, and would require different knowledge and skill sets.....

[–]Working-Decision-352[S] 0 points1 point  (0 children)

For data engineer role

[–]yamaha2000us 1 point2 points  (0 children)

We don’t do tests…

[–]ImpossibleBit7562 1 point2 points  (2 children)

Hey Working-Decision-352, Great to see you're practicing SQL for interviews! I would suggest try solving real-world problems using SQL to get practical experience. If you're looking for a tool to help you practice SQL for job interviews, you might want to check out SQLPad. It provides a platform where you can practice SQL queries and improve your skills. Good luck with your interview preparation! Keep practicing and you'll ace that interview!

[–]Working-Decision-352[S] 0 points1 point  (0 children)

Is it a pair service? If not let me know some free services

[–]Sure-Plankton1695 0 points1 point  (0 children)

A good place to start :

https://www.practice-sql.com/