Skip to content
Just another SQL blog

Just another SQL blog

  • home
  • featured
    • Pencil’n more
    • Bestes Sohn Seite
  • imprint
  • privacy
  • contact
  • English
    • Deutsch
    • English

Duplicates

Finding Duplicates with SQL — From COUNT(*) > 1 to Composite Keys

1. July 2026 by marcus

GROUP BY … HAVING count(*) > 1 may be the most-typed SQL snippet in the world — and yet it trips up in two places almost nobody has on their radar: composite keys and NULL. When it comes to missing values in a unique column, SQL Server and Postgres disagree — one allows exactly one NULL, the other any … Read more

Tags Data Quality, Data Quality Rules, Duplicates, Dynamic SQL

Latest Posts

  • Validating Data with SQL — Ranges, Required Fields and the NULL Trap
    Published Jun 30, 2026 · Updated Jul 1, 2026
  • Checking Data Quality with SQL — a Configurable Framework for Spotting Bad Data Generically
    Published Jun 24, 2026 · Updated Jul 1, 2026
  • Finding Duplicates with SQL — From COUNT(*) > 1 to Composite Keys
    Published Jul 1, 2026
  • Data Quality // Type Conversion Basics with T-SQL — CAST, CONVERT, TRY_CAST and TRY_CONVERT Compared
    Published Jun 30, 2026
  • Data Type Mapping SQL Server → PostgreSQL — What Converts Cleanly and What Breaks
    Published Jun 25, 2026 · Updated Jun 30, 2026

Tags

AI-Assisted Development (2) AI Agents (1) Claude Code (6) Data Integration (1) Data Migration (6) Data Quality (14) Data Quality Rules (3) Data Transfer (1) Data Type (6) Data Type Mapping (1) Design Pattern (4) Developer Workflow (5) Duplicates (1) Dynamic SQL (3) ELT (1) ETL (1) ETL Process (5) Formatting (5) Logging (1) Maintainability (3) Naming Convention (4) PL/pgSQL (5) Postgres (5) PostgreSQL (6) Prompt Engineering (1) Readability (7) Schema Migration (2) Source Control (1) SQL Server (5) SSIS (5) SSIS vs. SQL (4) Stored Procedure (1) T-SQL (11) Table Design (1) TRY_CONVERT (6) Type Conversion (8) Validation (1) Verification (1)
© 2018–2026 Marcus Belz · Imprint · Privacy · Contact · How This Blog Is Made