Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Difference between Mode and Only
T1:
load * Inline [
ID, Age
123, 12
123, 28
145, 30
145, 30
165, 15
165, 17
165, 15
165, 15
165, 12
165, 18
];
T2:
load ID, mode(Age) as AgeMode, only(Age) as AgeOnly
Resident T1 Group by ID;
T2 table Returns
ID, AgeMode, AgeOnly
123,-,-
145,30,30
165,15,-
but i didn't understand..
please explain it..
They are quite two different functions. Mode() returns the most common value in the group. Only() returns a value if there is only one value in the group, otherwise it returns null.
-Rob
Thanks Rob...
Its very Helpful answer.................