Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I had some datase like below
load * inline
[networkid, user, timestamp
n1,u1,1
n1,u2,2
n1,u3,3
n2,u1,2
n2,u2,3
n2,u3,1
n3,u1,3
n3,u2,2
n3,u3,1
n2,u1,3
n1,u1,3];
now i need to get the list of users who are in a network at highest time
something as below.
networkid timestamp users
n1 3 u1,u3
n2 3 u2,u1
please help me how to acheive this
send once sample out put,..i'll try what exactly u want ...artham kale ...:(
I had sent you sample datasets.
Timestamp, networked, user are fields.
Now from the two, I need to get the list of users with earliest timestamps grouped by networkid
time stamp edi ,user edi?
In the order I had specified.
Timestamp is in unix format
User is 3rd one.
Networked is 2nd one.
Following is the logic.
Users:
load * inline [networkid, user, timestamp
n1,u1,1
n1,u2,2
n1,u3,3
n2,u1,2
n2,u2,3
n2,u3,1
n3,u1,3
n3,u2,2
n3,u3,1
n2,u1,3
n1,u1,3];
Final_Table:
Load
networkid,
user,
Max(timestamp) as timestamp
Resident Users Group by networkid , user;
Drop Table Users;
i dont want to group them by network. i want them to group by user only
i want to get only first record of user
some thing like below
user timestamp(max) networkid
u1 3 n3
u2 3 n2
u3 3 n1
Following is the logic.
Users:
load * inline [networkid, user, timestamp
n1,u1,1
n1,u2,2
n1,u3,3
n2,u1,2
n2,u2,3
n2,u3,1
n3,u1,3
n3,u2,2
n3,u3,1
n2,u1,3
n1,u1,3];
Final_Table:
Load
user,
Max(timestamp) as timestamp
Resident Users Group by user;
Drop Table Users;
check this