Markus Winand
banner
winand.at
Markus Winand
@winand.at
SQL Renaissance Ambassador. Author, Trainer, Coach. PhD in Common Sense. Creator of http://use-the-index-luke.com and http://modern-sql.com.
Conditional aggregates even have their own clause: FILTER

modern-sql.com/feature/filter

But many vendors still ignore that so the we must revert to CASE.
The FILTER clause
The FILTER clause extends aggregate functions (SUM, AVG, COUNT, etc.) with an additional WHERE clause. Databases not supporting FILTER can use CASE within the aggregate function instead.
modern-sql.com
November 25, 2025 at 7:41 AM
Reposted by Markus Winand
Find yourself someone who will look at you the way I look at modern SQL modern-sql.com
November 14, 2025 at 1:43 PM
Ich hab den standard nie so interpretiert. Aktuell (SQL:2023) wurde es aber konfigurierbar gemacht: modern-sql.com/caniuse/F292
F292, “UNIQUE null treatment”
Explicit null treatment in unique constraints is not widely supported
modern-sql.com
October 21, 2025 at 4:40 AM
Because it is a list of lists.
September 24, 2025 at 6:22 AM
My favorite change is that MariaDB got an improved implementation of the WHERE year(...) = ? rewriting. use-the-index-luke.com/blog/2024-12...

In picture: the green check mark used to be yellow, with the "a" footnote: Unconditionally rewritten — even if only a matching function-based index exists
September 5, 2025 at 9:31 AM