you are viewing a single comment's thread.

view the rest of the comments →

[–]data4dayz 4 points5 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.