#sqlweird — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #sqlweird, aggregated by home.social.
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
DATE_FORMAT with Edge Cases?!
DATE_FORMAT has HUNDREDS of format codes! %j is day of year, %W is weekday name. This formatting language will confuse you!
#sql #sqltricks #dateformat #formatcodes #dateformatting #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #datefunctions #advancedsql
-
JSON Path Expressions Extract Data?!
JSON_EXTRACT uses PATH syntax! The $ symbol means root, . means property access. This JSON path language will confuse you!
#sql #sqltricks #jsonextract #jsonpath #jsonunquote #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #jsonfunctions #advancedsql
-
JSON Path Expressions Extract Data?!
JSON_EXTRACT uses PATH syntax! The $ symbol means root, . means property access. This JSON path language will confuse you!
#sql #sqltricks #jsonextract #jsonpath #jsonunquote #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #jsonfunctions #advancedsql
-
JSON Path Expressions Extract Data?!
JSON_EXTRACT uses PATH syntax! The $ symbol means root, . means property access. This JSON path language will confuse you!
#sql #sqltricks #jsonextract #jsonpath #jsonunquote #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #jsonfunctions #advancedsql
-
JSON Path Expressions Extract Data?!
JSON_EXTRACT uses PATH syntax! The $ symbol means root, . means property access. This JSON path language will confuse you!
#sql #sqltricks #jsonextract #jsonpath #jsonunquote #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #jsonfunctions #advancedsql
-
JSON Path Expressions Extract Data?!
JSON_EXTRACT uses PATH syntax! The $ symbol means root, . means property access. This JSON path language will confuse you!
#sql #sqltricks #jsonextract #jsonpath #jsonunquote #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #jsonfunctions #advancedsql
-
String Collation Changes Comparison?!
Collation CHANGES string comparison! Case-insensitive collation makes 'A' = 'a'. This hidden setting will break your WHERE clauses!
#sql #sqltricks #collation #stringcomparison #casesensitivity #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql
-
String Collation Changes Comparison?!
Collation CHANGES string comparison! Case-insensitive collation makes 'A' = 'a'. This hidden setting will break your WHERE clauses!
#sql #sqltricks #collation #stringcomparison #casesensitivity #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql
-
String Collation Changes Comparison?!
Collation CHANGES string comparison! Case-insensitive collation makes 'A' = 'a'. This hidden setting will break your WHERE clauses!
#sql #sqltricks #collation #stringcomparison #casesensitivity #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql
-
String Collation Changes Comparison?!
Collation CHANGES string comparison! Case-insensitive collation makes 'A' = 'a'. This hidden setting will break your WHERE clauses!
#sql #sqltricks #collation #stringcomparison #casesensitivity #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql
-
String Collation Changes Comparison?!
Collation CHANGES string comparison! Case-insensitive collation makes 'A' = 'a'. This hidden setting will break your WHERE clauses!
#sql #sqltricks #collation #stringcomparison #casesensitivity #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #stringfunctions #advancedsql
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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