Tag

DISTINCT

0 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
May 10, 2023 · Databases

Retrieving Unique Code Values with Corresponding Dates and Totals in MySQL

This article explains how to obtain distinct code entries together with their cdate and ctotal fields in MySQL, covering the use of DISTINCT, GROUP BY, handling ONLY_FULL_GROUP_BY mode, and alternative solutions such as GROUP_CONCAT with DISTINCT.

DISTINCTDatabaseGROUP BY
0 likes · 6 min read
Retrieving Unique Code Values with Corresponding Dates and Totals in MySQL
Laravel Tech Community
Laravel Tech Community
Feb 16, 2023 · Databases

DISTINCT vs GROUP BY in MySQL: Performance and Usage Guide

This article explains the differences between DISTINCT and GROUP BY in MySQL, showing that with an index they have similar efficiency, while without an index DISTINCT is usually faster because GROUP BY may trigger sorting and temporary tables, and it provides syntax, examples, and recommendations.

DISTINCTGROUP BYIndex
0 likes · 8 min read
DISTINCT vs GROUP BY in MySQL: Performance and Usage Guide
Selected Java Interview Questions
Selected Java Interview Questions
Dec 15, 2022 · Databases

DISTINCT vs GROUP BY in MySQL: Performance, Index Usage, and Implicit Sorting

This article explains the functional differences between DISTINCT and GROUP BY in MySQL, analyzes their performance with and without indexes, describes how implicit sorting affects GROUP BY before MySQL 8.0, and provides practical recommendations for choosing the appropriate clause.

DISTINCTDatabaseGROUP BY
0 likes · 9 min read
DISTINCT vs GROUP BY in MySQL: Performance, Index Usage, and Implicit Sorting
Laravel Tech Community
Laravel Tech Community
Apr 11, 2022 · Databases

Three Methods for SQL Deduplication: DISTINCT, GROUP BY, and ROW_NUMBER

This article explains three common SQL deduplication techniques—using DISTINCT, GROUP BY, and the ROW_NUMBER window function—illustrating their syntax, performance considerations, and example queries for counting unique task identifiers in relational databases.

DISTINCTDeduplicationGROUP BY
0 likes · 4 min read
Three Methods for SQL Deduplication: DISTINCT, GROUP BY, and ROW_NUMBER
Laravel Tech Community
Laravel Tech Community
Nov 11, 2021 · Databases

Using DISTINCT, GROUP BY, and ROW_NUMBER for De‑duplication in SQL

This article explains how to remove duplicate rows in SQL by using DISTINCT, GROUP BY, and the ROW_NUMBER window function, compares their syntax and performance, and provides concrete examples with a Task table and a Test helper table.

DISTINCTDeduplicationGROUP BY
0 likes · 4 min read
Using DISTINCT, GROUP BY, and ROW_NUMBER for De‑duplication in SQL