News for hackers. Stuff that matters.
Re:Medium-hard SQL interview questions by JohnTHaller on Saturday May 02, 2020 @07:44PM (#23055765)
I've been using SQL for 24 years and don't think I've ever used BETWEEN ROW before. Did read up on it now, though.
Re:Medium-hard SQL interview questions by psaux on Saturday May 02, 2020 @10:08PM (#23056332)
I wrote sql for years for a forex platform used by some of the top dogs (literal). Pretty hardcore sql and had to be very fast, never used BETWEEN ROW.
Re:Medium-hard SQL interview questions by roel_v on Sunday May 03, 2020 @04:44AM (#23057771)
What breeds of dogs use forex platforms?
Re:Medium-hard SQL interview questions by guywhocodes on Sunday May 03, 2020 @05:01AM (#23057837)
Fiat Retrievers
Re:Medium-hard SQL interview questions by thom on Sunday May 03, 2020 @06:19AM (#23058098)
I use it all the time, both in ad hoc queries and in data prep for models. Most commonly just to look into a future window from the current event (i.e. did this pass in a game of soccer lead to a shot etc). It's quite rare that I'll specifically care about X rows preceding or following but it does happen that you care about a shorter period than the entire window. Entirely possible people are using graph databases for that sort of thing, but the window syntax is nice.
Re:Medium-hard SQL interview questions by nogabebop23 on Sunday May 03, 2020 @01:24PM (#23060445)
There are so many specialized aspects that you'll never use outside of an interview or an edge case when you can learn it on-demand.
Re:Medium-hard SQL interview questions by markus_zhang on Sunday May 03, 2020 @10:50AM (#23059323)
I have to use it quite often because the dialect I'm using defaults on BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW which I have to manually change to BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.