Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RSvebeck
Specialist
Specialist

List of duplicates

Hello

I the following list  of data:

F1 F2
101 A
101 C
102 A
103 A
104 A
201 B
202 B
203 B
204 B
301 C
302 C
303 C
304 C


As you can see; where F1=101 F2 exits twice :  for F2=A and F2=C


My question is: How can I produce this list:

F2
A
C

For some reason (this seems to be a simple task) but I can just not get it to work ....

I do not want a list like this (already have it...):

F1 F2 COUNT(TOTAL <F1>  F1)
101 A 2
102 A 1
103 A 1
104 A 1
201 B 1
202 B 1
203 B 1
204 B 1
101 C 2
301 C 1
302 C 1
303 C 1
304 C 1

-> I just want a list of values on F2 where my count is greater than 1.


//Robert

Svebeck Consulting AB
1 Solution

Accepted Solutions
jvitantonio
Luminary Alumni
Luminary Alumni

Is this what you need?

View solution in original post

5 Replies
jvitantonio
Luminary Alumni
Luminary Alumni

Is this what you need?

Not applicable

An this does it in the script:

tab1:

LOAD * INLINE [

F1, F2

101, A

101, C

102, A

103, A

104, A

201, B

202, B

203, B

204, B

301, C

302, C

303, C

304, C

];

map:

MAPPING LOAD

F1, count(F1)

RESIDENT tab1

GROUP BY F1;

tab2:

LOAD

F2

RESIDENT tab1

WHERE ApplyMap( 'map', F1, 0 )=2;

Olof Laurin, Senior Consultant at Tacticus AB, http://www.tacticus.se

Not applicable

just a small change on your last line:

WHERE ApplyMap('map', F1, 0) > 1;

RSvebeck
Specialist
Specialist
Author

Hi and thanks for your solution.

Actually, my example data was (as it turned out) not complex enough. I will make a new post with a new question because your solution was not compatible to my "real" data. But your solution did solve this example so therefore the "correct answer". Regards, Robert

Svebeck Consulting AB
RSvebeck
Specialist
Specialist
Author

Thanks Olof for lookinginto this. I was looking for a solution with expressions but I will use this method if there are no expressions that solves my "real example" or if the expression solution will be to slow for the end user. Regards, Robert

Svebeck Consulting AB