Select - Numeric Vectors: Unique

The Unique template appears in the template list when a numeric vector field, that is a field with an ordered set of multiple numbers, of x2 (two numbers), x3 (three numbers), or x4 (four numbers), numeric vector type 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 vector 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 field called x3 vector of type uint8x3.   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 x3 vector 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 x3 vector 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 x3 vector 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 field called x3 vector of type uint8x3.   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 x3 vector 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 x3 vector 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 x3 vector field.

 

Unique : unique

Select records with values that occur only once.

 

We start with a table with a single field called x3 vector of type uint8x3.   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 x3 vector 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 x3 vector 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 x3 vector field.

 

 

Notes

Numeric vector types - Numeric vectors are fields that have ordered sets of multiple numbers, of x2 type float32x2, float64x2, int8x2, int16x2, int32x2, int64x2uint8x2, uint16x2, uint32x2, uint6x2, of x3 type float32x3, float64x3, int8x3, int16x3, int32x3, int64x3uint8x3, uint16x3, uint32x3, uint6x3, or of x4 type float32x4, float64x4, int8x4, int16x4, int32x4, int64x4uint8x4, uint16x4, uint32x4, uint6x4.

 

See Also

Select - Numeric Vectors

 

Select - Numeric Vectors: Expression

 

Select - Numeric Vectors: Null

 

Select - Numeric Vectors: Search

 

Select - Numeric Vectors: Statistic

 

Select Reference

 

Select - Expression