- Documentation
Torch Log Service
User Guide
Query and analysis
SQL syntax
DISTINCT clause
SQL syntax
DISTINCT clause
DISTINCT clause
The DISTINCT clause should be used in the SELECT clause to remove duplicate values from the specified fields. That is, when a field contains multiple duplicate values, you can use the DISTINCT clause to remove duplicates and extract only unique values. This document introduces the syntax format and examples of the DISTINCT clause.
Grammar format
The syntax of the DISTINCT clause is as follows.
Syntax example
- Query the unique values of the TopicID field.
- Query and analysis statement
- Query and analysis results
-
- Count the number of Topics
- Query and analysis statement
- Query and analysis results
-
Last updated: 2026.07.22 18:38:21