#sqltricks

PrecisionSQLPrecisionSQL
2026-03-13

Subquery Returns Multiple Rows In Comparison?!

Using subquery that returns multiple rows in = comparison crashes! SQL doesn't know which row to use. This breaks subqueries! Watch!

youtube.com/watch?v=x15LSXR-uVM

PrecisionSQLPrecisionSQL
2026-02-25

0.1 + 0.2 In SQL = 0.30000000000000004?!

SQL floating point precision is broken! Adding 0.1 + 0.2 creates a number with precision errors. This breaks financial calculations! Watch!

youtube.com/watch?v=C53FQIhge3U

PrecisionSQLPrecisionSQL
2026-02-18

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!

youtube.com/watch?v=OMjcmF4mw08

PrecisionSQLPrecisionSQL
2026-02-17

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!

youtube.com/watch?v=TbQfBej6dis

PrecisionSQLPrecisionSQL
2026-02-15

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!

youtube.com/watch?v=wNyhCqAhlb8

PrecisionSQLPrecisionSQL
2026-02-12

COUNT(*) vs COUNT(column) Are DIFFERENT?!

COUNT(*) and COUNT(column) behave completely differently with NULLs! One counts NULLs, one doesn't. This breaks aggregate logic! Watch!

youtube.com/watch?v=lCeAps3FTGg

PrecisionSQLPrecisionSQL
2026-02-11

JOIN With NULL Keys Returns ZERO Rows?!

JOINing tables with NULL keys returns ZERO rows! NULL = NULL in JOIN is FALSE. This breaks all join logic! Watch!

youtube.com/watch?v=4PlkdCq4KnE

PrecisionSQLPrecisionSQL
2026-02-10

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!

youtube.com/watch?v=MVixOi9e8zE

PrecisionSQLPrecisionSQL
2026-02-10

LEN('') vs LEN(NULL) vs LEN(' ') Are DIFFERENT?!

LEN of empty string, NULL, and space are all different! Empty = 0, NULL = NULL, Space = 1. This breaks string length logic! Watch!

youtube.com/watch?v=mvXKvslW08w

PrecisionSQLPrecisionSQL
2026-02-06

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!

youtube.com/watch?v=MRgaM0p-Obg

PrecisionSQLPrecisionSQL
2026-02-06

'10' + 5 In SQL Does WHAT?!

SQL implicit type conversion will shock you! Adding string '10' to number 5 creates something unexpected. This breaks type safety! Watch!

youtube.com/watch?v=21ggk4VvFvM

PrecisionSQLPrecisionSQL
2026-02-04

10 % 0 Modulo By Zero Returns WHAT?!

Modulo by zero in SQL doesn't always crash! Some databases return NULL, others error. This breaks math operations! Watch the chaos!

youtube.com/watch?v=S-r3m92XI70

PrecisionSQLPrecisionSQL
2026-02-03

NULL IN (1,2,3) Is NOT What You Think!

Your brain will explode! Checking if NULL is IN a list returns something that makes NO sense. This breaks every query! Watch the chaos!

youtube.com/watch?v=5FqLSPXnieA

PrecisionSQLPrecisionSQL
2026-01-24

Three-Valued Logic: AND - OR With NULL?!

SQL has THREE truth values: TRUE, FALSE, and UNKNOWN (NULL)! AND/OR with NULL creates logic that breaks everything! Watch!

youtube.com/watch?v=Dg3yabp9sa4

PrecisionSQLPrecisionSQL
2026-01-24

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!

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

PrecisionSQLPrecisionSQL
2026-01-21

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!

youtube.com/watch?v=ncgl7_S0NvQ

PrecisionSQLPrecisionSQL
2026-01-17

GROUP BY NULLs Are Treated As ONE?!

GROUP BY treats all NULLs as the same group! Multiple NULL rows get grouped together. This breaks grouping logic! Watch now!

youtube.com/watch?v=KCBZwLbAF8Y

PrecisionSQLPrecisionSQL
2026-01-16

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!

youtube.com/watch?v=5x89cEbWuPg

PrecisionSQLPrecisionSQL
2026-01-15

COALESCE(NULL, NULL, NULL) Returns WHAT?!

COALESCE with all NULLs returns something that defies logic! This function is supposed to return first non-NULL but what if all are NULL? Watch!

youtube.com/watch?v=85Dkogn0mPY

PrecisionSQLPrecisionSQL
2026-01-14

EXISTS vs IN With NULL Breaks Logic!

EXISTS and IN behave completely differently with NULL! One works, one doesn't. This breaks subquery logic! Watch the chaos!

youtube.com/watch?v=dwtsETOcH2Q

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst