Toni Vukasinovic
Toni Vukasinovic

Reputation: 67

Get MAXvalue from column where comparing to other columns?

Input table:

Type Comment Value
A value2 20
A value5 19
B value8 20
A value2 17
A value5 20
B value8 20
C value2 21
A value5 23
B value8 23

Final Table:

Type Comment Value
A value5 23
B value8 23
C value2 21

Upvotes: 0

Views: 41

Answers (1)

Steve Johnson
Steve Johnson

Reputation: 8670

As Nandan says, you can create a select query as source.

Another way, you can use Aggregate transformation to do this.

Steps:

1.After adding your source, add a Aggregate transformation. It's setting as the following screenshot.

enter image description here

enter image description here

Data Preview:

enter image description here

  1. New a branch of your source, then join your branch and Aggregate transformation.

enter image description here

  1. Add a Select transformation to delete the duplicate columns.

enter image description here

  1. Result:

enter image description here

Upvotes: 2

Related Questions