Tagged articles
13 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 19, 2024 · Databases

Understanding the HAVING Clause in SQL: Concepts, Examples, and Best Practices

This article explains the purpose and proper use of the SQL HAVING clause, contrasts it with WHERE, and provides multiple practical examples—including counting groups, detecting missing IDs, calculating mode and median, and filtering fully‑submitted records—while highlighting common pitfalls and performance considerations.

GROUP BYHAVINGaggregation
0 likes · 13 min read
Understanding the HAVING Clause in SQL: Concepts, Examples, and Best Practices
Liangxu Linux
Liangxu Linux
Aug 27, 2023 · Databases

Understanding the Real Execution Order of SQL Queries

This article explains the true execution sequence of SQL statements—starting with FROM and JOIN, then WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, and LIMIT—illustrating each step with diagrams, examples, and code snippets to clarify how databases process queries.

FROMGROUP BYHAVING
0 likes · 6 min read
Understanding the Real Execution Order of SQL Queries
Architecture Digest
Architecture Digest
Feb 22, 2023 · Databases

Understanding the Execution Order of SQL Queries

This article explains the logical execution sequence of a typical SQL query, detailing each phase from FROM/JOIN/WHERE through GROUP BY, HAVING, SELECT, ORDER BY, and LIMIT, and illustrating the process with diagrams and code examples.

From Join WhereGROUP BYHAVING
0 likes · 8 min read
Understanding the Execution Order of SQL Queries
Java Architect Essentials
Java Architect Essentials
Feb 19, 2023 · Databases

Understanding the Execution Order of SQL Queries

This article explains the step‑by‑step execution order of a standard SQL query, covering FROM/JOIN, WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY and LIMIT, and provides illustrative code snippets and diagrams to clarify each stage.

FROMGROUP BYHAVING
0 likes · 5 min read
Understanding the Execution Order of SQL Queries
Liangxu Linux
Liangxu Linux
Sep 13, 2022 · Databases

How to Find and Remove Duplicate Rows in SQL

This guide explains how to identify duplicate rows in a MySQL table using GROUP BY and HAVING, how to delete the extra rows while keeping the earliest entry, and how to handle duplicate detection across multiple columns with correct query patterns and common pitfalls.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in SQL
Programmer DD
Programmer DD
Apr 8, 2021 · Databases

Master SQL HAVING: Filter Groups Like a Pro

This article explains the purpose and proper use of the SQL HAVING clause, demonstrates how it works with GROUP BY to filter aggregated groups, shows examples for finding groups with specific counts, missing IDs, mode, median, and non‑NULL values, and clarifies best practices for query performance and semantics.

GROUP BYHAVINGaggregation
0 likes · 13 min read
Master SQL HAVING: Filter Groups Like a Pro
Liangxu Linux
Liangxu Linux
Mar 17, 2019 · Databases

How to Find and Remove Duplicate Rows in SQL Tables

This guide explains how to define duplicate rows, use GROUP BY and HAVING to locate them, and apply temporary tables and DELETE statements to remove duplicates while preserving the row with the smallest ID.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in SQL Tables
MaGe Linux Operations
MaGe Linux Operations
Feb 28, 2019 · Databases

How to Find and Remove Duplicate Rows in MySQL

This article shows step‑by‑step how to identify duplicate rows in a MySQL table—whether the duplication is based on a single column, multiple columns, or either column—and provides reliable SQL patterns, including GROUP BY with HAVING, UNION, sub‑queries, temporary tables, and a safe DELETE statement to clean the data.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in MySQL
MaGe Linux Operations
MaGe Linux Operations
Apr 26, 2018 · Databases

Find Duplicate Rows in MySQL: Simple Queries for Beginners

This article shows how to identify and remove duplicate rows in a MySQL table by defining duplication, using GROUP BY with HAVING, creating temporary tables with MIN, and applying various techniques—including UNION, nested subqueries, and joins—to handle single‑column and multi‑column duplicate detection.

GROUP BYHAVINGdata cleaning
0 likes · 11 min read
Find Duplicate Rows in MySQL: Simple Queries for Beginners
ITPUB
ITPUB
Apr 3, 2016 · Databases

Master SQL GROUP BY: From Simple Aggregations to Rollup and Joins

This guide explains how to use SQL's GROUP BY clause with examples covering basic grouping, GROUP_CONCAT, aggregate functions, HAVING filters, multi‑column grouping, WITH ROLLUP, and inner, left, and right joins, illustrating each technique with clear query results.

GROUP BYHAVINGWITH ROLLUP
0 likes · 7 min read
Master SQL GROUP BY: From Simple Aggregations to Rollup and Joins