#windowfunctions — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #windowfunctions, aggregated by home.social.
-
Window ORDER BY NULLS FIRST - LAST?!
NULLS FIRST and NULLS LAST change window function results! The order of NULLs matters in window functions. This subtle difference will cause bugs!
#sql #sqltricks #windowfunctions #nullsfirst #nullslast #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #nullhandling #advancedsql
-
ROW_NUMBER() OVER (ORDER BY NULL) Does WHAT?!
ROW_NUMBER with ORDER BY NULL creates non-deterministic ordering! All rows get random numbers. This breaks window functions! Watch!
#sql #sqltricks #database #sqltutorial #rownumber #windowfunctions #sqlquiz #codingchallenge #sqlshorts #sqlbugs #ordering #sqlwtf
-
ROW_NUMBER() OVER (ORDER BY NULL) Does WHAT?!
ROW_NUMBER with ORDER BY NULL creates non-deterministic ordering! All rows get random numbers. This breaks window functions! Watch!
#sql #sqltricks #database #sqltutorial #rownumber #windowfunctions #sqlquiz #codingchallenge #sqlshorts #sqlbugs #ordering #sqlwtf
-
ROW_NUMBER() OVER (ORDER BY NULL) Does WHAT?!
ROW_NUMBER with ORDER BY NULL creates non-deterministic ordering! All rows get random numbers. This breaks window functions! Watch!
#sql #sqltricks #database #sqltutorial #rownumber #windowfunctions #sqlquiz #codingchallenge #sqlshorts #sqlbugs #ordering #sqlwtf
-
ROW_NUMBER() OVER (ORDER BY NULL) Does WHAT?!
ROW_NUMBER with ORDER BY NULL creates non-deterministic ordering! All rows get random numbers. This breaks window functions! Watch!
#sql #sqltricks #database #sqltutorial #rownumber #windowfunctions #sqlquiz #codingchallenge #sqlshorts #sqlbugs #ordering #sqlwtf
-
ROW_NUMBER() OVER (ORDER BY NULL) Does WHAT?!
ROW_NUMBER with ORDER BY NULL creates non-deterministic ordering! All rows get random numbers. This breaks window functions! Watch!
#sql #sqltricks #database #sqltutorial #rownumber #windowfunctions #sqlquiz #codingchallenge #sqlshorts #sqlbugs #ordering #sqlwtf
-
LAG - LEAD Default Value Trap?!
LAG and LEAD have DEFAULT values! When there's no previous/next row, they return the default. This hidden parameter will surprise you!
#sql #sqltricks #lag #lead #defaultvalue #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #windowfunctions #advancedsql
-
Window PARTITION BY Changes Results?!
PARTITION BY creates separate windows! Each partition has its own running sum. This partitioning will change your aggregation results!
#sql #sqltricks #partitionby #windowfunctions #runningsum #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #advancedsql
-
NTH_VALUE Gets Specific Position?!
NTH_VALUE extracts the Nth value from window! It's like array indexing for window functions. This positional access will surprise you!
#sql #sqltricks #nthvalue #windowfunctions #positionalaccess #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #advancedsql