Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I change the Place field to be for each Name - the current Place minus the minimum number of the place for this Name +1?
LOAD * INLINE [
Place, Name, Score
5, a, 5
1, b, 6
10, c, 7
6, a, 8
2, b, 9
20, c, 10
8, a, 11
];
Try this
Table:
LOAD *,
AutoNumber(Place, Name) as Key;
LOAD * INLINE [
Place, Name, Score
5, a, 5
1, b, 6
10, c, 7
6, a, 8
2, b, 9
20, c, 10
8, a, 11
];
Left Join (Table)
LOAD Name,
Place as New_Place
Resident Table
Where Key = 1;
FinalTable:
LOAD Place - New_Place + 1 as Place,
Name,
Score
Resident Table;
DROP Table Table;
Try this
Table:
LOAD *,
AutoNumber(Place, Name) as Key;
LOAD * INLINE [
Place, Name, Score
5, a, 5
1, b, 6
10, c, 7
6, a, 8
2, b, 9
20, c, 10
8, a, 11
];
Left Join (Table)
LOAD Name,
Place as New_Place
Resident Table
Where Key = 1;
FinalTable:
LOAD Place - New_Place + 1 as Place,
Name,
Score
Resident Table;
DROP Table Table;
very impressive, thanks