home.social

#sqlweird — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #sqlweird, aggregated by home.social.

  1. HAVING Filters After GROUP BY?!

    HAVING filters GROUPS, WHERE filters ROWS! HAVING runs after aggregation, WHERE runs before. This order matters and will break your logic!

    #sql #sqltricks #having #where #groupby #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #aggregation #advancedsql

    youtube.com/watch?v=OMjcmF4mw08

  2. 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

    youtube.com/watch?v=TbQfBej6dis

  3. 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

    youtube.com/watch?v=TbQfBej6dis

  4. 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

    youtube.com/watch?v=TbQfBej6dis

  5. 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

    youtube.com/watch?v=TbQfBej6dis

  6. 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

    youtube.com/watch?v=TbQfBej6dis

  7. Decimal Precision Rounds Numbers?!

    DECIMAL precision ROUNDS values! Cast 1.999 to DECIMAL(5,2) and it becomes 2.00. This silent rounding will cause calculation errors!

    #sql #sqltricks #decimal #precision #rounding #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #datatypes #advancedsql

    youtube.com/watch?v=wNyhCqAhlb8

  8. TRIM with Different Characters?!

    TRIM can remove ANY character! Not just spaces. LEADING, TRAILING, or BOTH. This flexible trimming will clean your data in unexpected ways!

    #sql #sqltricks #trim #leading #trailing #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql

    youtube.com/watch?v=MRgaM0p-Obg

  9. TRIM with Different Characters?!

    TRIM can remove ANY character! Not just spaces. LEADING, TRAILING, or BOTH. This flexible trimming will clean your data in unexpected ways!

    #sql #sqltricks #trim #leading #trailing #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql

    youtube.com/watch?v=MRgaM0p-Obg

  10. TRIM with Different Characters?!

    TRIM can remove ANY character! Not just spaces. LEADING, TRAILING, or BOTH. This flexible trimming will clean your data in unexpected ways!

    #sql #sqltricks #trim #leading #trailing #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql

    youtube.com/watch?v=MRgaM0p-Obg

  11. TRIM with Different Characters?!

    TRIM can remove ANY character! Not just spaces. LEADING, TRAILING, or BOTH. This flexible trimming will clean your data in unexpected ways!

    #sql #sqltricks #trim #leading #trailing #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql

    youtube.com/watch?v=MRgaM0p-Obg

  12. TRIM with Different Characters?!

    TRIM can remove ANY character! Not just spaces. LEADING, TRAILING, or BOTH. This flexible trimming will clean your data in unexpected ways!

    #sql #sqltricks #trim #leading #trailing #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql

    youtube.com/watch?v=MRgaM0p-Obg

  13. CHAR vs VARCHAR Padding?!

    CHAR PADS with spaces! VARCHAR doesn't. LENGTH() returns different values for same string in CHAR vs VARCHAR. This padding will break comparisons!

    #sql #sqltricks #char #varchar #padding #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringtypes #advancedsql

    youtube.com/watch?v=0DNOIV-lXyo

  14. Conditional Aggregation with CASE?!

    CASE inside SUM creates conditional aggregation! You can sum only certain rows based on conditions. This conditional math will transform your data!

    #sql #sqltricks #case #sum #conditionalaggregation #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #aggregation #advancedsql

    youtube.com/watch?v=ncgl7_S0NvQ

  15. NULL = NULL Is FALSE In SQL?!

    STOP SCROLLING! Comparing NULL to NULL in SQL returns FALSE, not TRUE! This breaks every assumption about equality. Your mind will explode! Watch now!

    #sql #sqltricks #database #sqltutorial #sqlweird #nullcomparison #sqlquiz #codingchallenge #sqlshorts #sqlwtf #databasequeries #sqlbugs

    youtube.com/watch?v=5x89cEbWuPg

  16. Date Arithmetic with Leap Year?!

    Leap years BREAK date math! February 28 + 1 day = February 29 in leap years, March 1 in non-leap years. This edge case will cause bugs!

    #sql #sqltricks #datearithmetic #leapyear #dateadd #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #datefunctions #advancedsql

    youtube.com/watch?v=LndKlugNMrE

  17. 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

    youtube.com/watch?v=zGKaBIgNThU

  18. 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

    youtube.com/watch?v=zGKaBIgNThU

  19. 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

    youtube.com/watch?v=zGKaBIgNThU

  20. 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

    youtube.com/watch?v=zGKaBIgNThU

  21. 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

    youtube.com/watch?v=zGKaBIgNThU

  22. NULLIF and COALESCE Chain?!

    NULLIF and COALESCE can be CHAINED! NULLIF converts to NULL, COALESCE converts from NULL. This transformation chain will surprise you!

    #sql #sqltricks #nullif #coalesce #functionchaining #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #nullhandling #advancedsql

    youtube.com/watch?v=36UQvnnAo5s

  23. NULLIF and COALESCE Chain?!

    NULLIF and COALESCE can be CHAINED! NULLIF converts to NULL, COALESCE converts from NULL. This transformation chain will surprise you!

    #sql #sqltricks #nullif #coalesce #functionchaining #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #nullhandling #advancedsql

    youtube.com/watch?v=36UQvnnAo5s

  24. NULLIF and COALESCE Chain?!

    NULLIF and COALESCE can be CHAINED! NULLIF converts to NULL, COALESCE converts from NULL. This transformation chain will surprise you!

    #sql #sqltricks #nullif #coalesce #functionchaining #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #nullhandling #advancedsql

    youtube.com/watch?v=36UQvnnAo5s

  25. NULLIF and COALESCE Chain?!

    NULLIF and COALESCE can be CHAINED! NULLIF converts to NULL, COALESCE converts from NULL. This transformation chain will surprise you!

    #sql #sqltricks #nullif #coalesce #functionchaining #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #nullhandling #advancedsql

    youtube.com/watch?v=36UQvnnAo5s

  26. 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

    youtube.com/watch?v=OdUmjf_ZbSU

  27. 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

    youtube.com/watch?v=OdUmjf_ZbSU

  28. 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

    youtube.com/watch?v=OdUmjf_ZbSU

  29. 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

    youtube.com/watch?v=OdUmjf_ZbSU

  30. 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

    youtube.com/watch?v=OdUmjf_ZbSU

  31. Self-Join with Aliases Trap?!

    Self-joins need DIFFERENT aliases! Same table, different names. The join condition creates relationships within the same table. This will confuse you!

    #sql #sqltricks #selfjoin #aliases #tablealiases #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #joins #advancedsql

    youtube.com/watch?v=a5FIIZPvZ7A

  32. 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

    youtube.com/watch?v=6wNXQoiEg8Y

  33. 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

    youtube.com/watch?v=6wNXQoiEg8Y

  34. 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

    youtube.com/watch?v=6wNXQoiEg8Y

  35. 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

    youtube.com/watch?v=6wNXQoiEg8Y

  36. 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

    youtube.com/watch?v=6wNXQoiEg8Y

  37. CTE Referenced Multiple Times?!

    CTEs can be referenced MULTIPLE times! The same CTE appears in different parts of the query. This reusability will simplify complex queries!

    #sql #sqltricks #cte #withclause #multiplereferences #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #commontableexpressions #advancedsql

    youtube.com/watch?v=7eK8AtN9PLU

  38. Correlated Subquery in SELECT?!

    Subqueries in SELECT execute for EVERY row! This correlated subquery runs once per row, creating a performance nightmare. This is why queries are slow!

    #sql #sqltricks #correlatedsubquery #selectclause #performance #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #subqueries #advancedsql

    youtube.com/watch?v=GdfjEk34nRQ