Wie können wir Ihnen helfen?
< Zurück
Drucken

Unique

Reduces the result to a unique subset using one or more column lists. It thus offers a similar functionality as GROUP BY or DISTINCT.

 

Example

In the following, a result table of 6 rows is generated with a ClientQuery. A unique filter with 2 column lists is applied to this.

--- !ClientQuery
Id: Agents
Statement: Select '007' as Agent, 1 as Part, 'a' as Project
     UNION Select 'Smith' as Agent, 2 as Part, 'b' as Project
     UNION Select 'Smith' as Agent, 3 as Part, 'c' as Project
     UNION Select 'Johnson' as Agent, 4 as Part, 'd' as Project
     UNION Select 'Scully' as Agent, 4 as Part, 'd' as Project
     UNION Select 'Mulder' as Agent, 4 as Part, 'e' as Project
ResultFilters:
    - Unique:
        - [Agent]
        - [Part, Project]

Result:

AgentPartProject
0071a
Smith2b
Johnson4d
Mulder4e

The second line for Smith was filtered out because it has already occurred once. The line Scully was filtered out because the value combination Part = 4 and Project = “d” has already occurred with Johnson.

Inhaltsverzeichnis