News for hackers. Stuff that matters.
Re:Medium-hard SQL interview questions by thomzi12 on Saturday May 02, 2020 @05:47PM (#23055189)
Thanks for the feedback! The first section is intentionally about self-joins since they get asked about in interviews, but other people have brought up that window functions are more efficient, so I'll add in those solutions as well.

Sorry you feel that way! Thankfully my employer felt differently :)

Re:Medium-hard SQL interview questions by beckingz on Saturday May 02, 2020 @06:25PM (#23055382)
If it runs fast fast enough or the business can wait long enough, slow and ugly is acceptable.
Re:Medium-hard SQL interview questions by deepsun on Friday May 15, 2020 @12:51PM (#23194337)
That's exactly what I look against on interviews. Slow SQL queries tend to work fine for some time, and as data grows, they start failing.

I'd want to hire a professional, who knows the perfect way of doing that, so for them it would be as easy to make it right, as to make it ugly.

Re:Medium-hard SQL interview questions by thomzi12 on Saturday May 02, 2020 @06:47PM (#23055485)
Yes, in particular for data analysts using SQL to answer product/business questions in a one-off fashion
Re:Medium-hard SQL interview questions by MaxBarraclough on Sunday May 03, 2020 @06:00AM (#23058035)
Unless the dataset grows, poorly optimised queries slow down superlinearly, and things start falling over.