Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey, i am searching for a possibility to aggregate data within the distinct command. I want to have just a distinct "mac" and the highest number. Could somebody help to make this possible?
table1:
load * inline [
mac, number
aab1,5
aab1,2
ccde,1
ddee,2
];
I expect the following table:
aab1,5
ccde,1
ddee,2
Thanks
table1:
LOAD mac, max(number) as number
group by mac;
load * inline [
mac, number
aab1,5
aab1,2
ccde,1
ddee,2
];
Thanks for your solution. It works fine with two columns. I will do it a little more complicated. I have additional text, after the max(number)... Do you have also a solution for that ?
table1:
load * inline [
mac, number, Text
aab1,5, This is five
aab1,2, This is two
ccde,1, This is one
ddee,2, This is two
];
I expect the following table:
aab1,5, This is five
ccde,1, This is one
ddee,2, This is two
table123:
load * inline [
mac,number,Text
aab1,5,This is five
aab1,2,This is two
ccde,1,This is one
ddee,2,This is two
];
inner join
LOAD mac, max(number) as number //,text(Text) as Text
Resident table123
group by mac;