Select - Numbers: Unique

The Unique template appears in the template list when a numeric field of type float32, float64, int8, int16, int32, int64uint8, uint16, uint32, or uint6 has been picked in the Select pane.  The template selects records based on how many times their values occur in a table.

 

 

Unique

Selects records based on how many times their values occur in a table using the given Condition:

 

Condition options:

 

  • duplicate - for each duplicate value, selects all such records except one,
  • non-unique - selects records with values that occur more than once,
  • unique - selects records with values that occur only once.

 

Launch the template by choosing a numeric field in the Select pane and then double-clicking the Unique template.  When the template launches we can specify options.

 

 

Unique : duplicate

For each duplicate value, select all records except one.  

 

We start with a table with a single Integers field of type int32.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the Integers field and then we double-click the Unique template to launch it.

 

 

In the Unique template we choose duplicate as the Condition option.   For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above, we have Ctrl-clicked the column header for the Integers field, to sort the field from lowest value to highest value.  That makes clear how the template selects all duplicates but one for records that have duplicate values in the Integers field.

 

Note that the description of what the duplicate option does is that it selects all duplicates except one record.  It is not a matter of selecting all duplicates except the "first" record or except the "last" record.  It simply picks at random one of the duplicate value records to not select out of records with duplicate values.

 

Unique : non-unique

Select records with values that occur more than once, that is, selecting all records with duplicate values in the target field.

 

We start with a table with a single Integers field of type int32.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the Integers field and then we double-click the Unique template to launch it.

 

 

In the Unique template we choose non-unique as the Condition option.   For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above, we have Ctrl-clicked the column header for the Integers field, to sort the field from lowest value to highest value.  That makes clear how the template selects all records with duplicate values in the Integers field.

 

Unique : unique

Select records with values that occur only once.

 

We start with a table with a single Integers field of type int32.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the Integers field and then we double-click the Unique template to launch it.

 

 

In the Unique template we choose unique as the Condition option.   For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above, we have Ctrl-clicked the column header for the Integers field, to sort the field from lowest value to highest value.  That makes clear how the template selects all records that have unique values, that is, that do not have duplicate values, in the Integers field.

 

 

See Also

Select - Numbers

 

Select - Numbers: Expression

 

Select - Numbers: Null

 

Select - Numbers: Search

 

Select - Numbers: Statistic

 

Select Reference

 

Select - Expression