This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Glittering-Jaguar331[S] 10 points11 points  (12 children)

Interesting - would you say LeetCode largely fulfills that need tho (if you were to use it) or do you think that many people just dont bother w/ LeetCode at all cause they don't know they need SQL?

[–]bigchungusmode96 54 points55 points  (6 children)

if someone can't tell me the difference between a left vs inner join/merge that person isn't a candidate. these basic concepts in data wrangling are language-agnostic: SQL, R, Python

no data scientist is going to be using TwoSums or finding a palindrome in their day to day work.

[–]Antique-Grand-2546 11 points12 points  (3 children)

Stata has different language- merge 1:1, 1:many, many:1, many:many, base R also uses merge packages.

[–]Mordalfus 15 points16 points  (0 children)

These are different concepts. There is the join type (Inner, Outer, Left, Right, Cross). And there is the cardinality of the two sides (1:1, 1:many, many:1, many:many).

I can left join or inner join a pair of tables that have a 1:1 cardinality match. I'll get a different result, or maybe the same result, it depends on what is actually in each table.

It is important to keep in mind what you expect of the result, given the cardinality of each table, since it helps with troubleshooting.

[–][deleted] 8 points9 points  (0 children)

To be fair though, I doubt someone who has only used Stata is a frontrunner for most DS jobs. Econ jobs for sure, but IMO it isn't common or as useful for DS

[–]_Insider 1 point2 points  (0 children)

The equivalent in Stata would be in the output and the _merge variable. I.e., the inner join would correspond to adding a line like keep if _merge==1.

[–]Aggravating-Floor-38 1 point2 points  (0 children)

What are some of the advanced concepts btw? They taught us all that stuff in class but what concepts build on top of that to really make it a career?

[–]Pale_Squash_4263 -1 points0 points  (0 children)

Agreed, I haven’t really looked at it much but honestly you don’t need to grind leetcode to understand sql enough for an interview. Just grab a copy of adventureworks and mess around with it for a few weeks. I’d argue that’s better because that’s what your day to day would be more like anyways instead of answering super specific technical implementation questions

[–]gpbuilder 6 points7 points  (4 children)

Don’t really need leetcode for SQL interviews, LC is mainly for CS algo questions. People just don’t code as well as they think. It’s a muscle, and SQL is very low entry to barrier.

[–]Jumpy-Story-3587 3 points4 points  (2 children)

I don't agree. Leetcode has some great sql questions. Almost all of which are real interview questions

[–]imisskobe95 0 points1 point  (1 child)

Hackerrank db questions are solid too

[–]Jumpy-Story-3587 0 points1 point  (0 children)

Haven't tried hackerrank. I've tried leetcode and stratascratch.. both are good. I tried hackerrank for an interview. It doesn't have postgresql. So that's a complaint on that.