Recent Articles

SQL,

How to Parse XML Data in SQL Server

Are you still using fragile OPENXML and messy SQL to wrestle nested XML into relational tables on SQL Server? You know the drill: It starts as a simple script, but…
Uli Bethke January 25, 2024
SQL,

Mastering SQL: How to detect and avoid 34+ Common SQL Antipatterns

Overview Are you looking for reasons why your SQL queries are slow or costly. Look no more. This blog post showcases a comprehensive list of 34 SQL antipatterns. Use it…
Uli Bethke December 6, 2023
SQL,

SQL Challenge: Tackling the Island Problem in Time Series Data

Jump into our SQL Challenge! Today, we're exploring customer loyalty trends. Are you prepared to show off your SQL skills? About the quiz In this SQL pop quiz, we're challenging…
Uli Bethke November 7, 2023
SQL,

Detect Bad SQL with Static & Dynamic Code Analysis – A Guide

Preventing Query Catastrophe with FlowHigh SQL Analyser Does the following sound familiar? As the wizard EsQuEl delved deep into the SQL code, he stumbled upon multiple instances where tables were…
Uli Bethke September 8, 2023
SQL,

Avoid SQL Anti-Patterns – OUTER Joins & Anti Joins Explained

You often need to find both matched and unmatched rows between two or more tables. As we all know we use OUTER joins in SQL to achieve this. However, there…
Uli Bethke August 29, 2023

SQL antipatterns:  SELECT DISTINCT

The DISTINCT operator The DISTINCT operator is used to eliminate duplicates in a resultset, e.g. we can use it to identify the unique number of customers who made a purchase.…
Uli Bethke August 9, 2022
spinner