Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a dataset with difference numbers of multiple instances eg :
ID | user | Date |
1522448 | MJP | 01/05/2014 |
1522448 | MJP | 12/08/2014 |
1522448 | MJP | 03/01/2015 |
There can be anything from 1 instance upto 10 or 12. In the above example, I need to Flag the record with the Date of 01/05/2014 as being the First record using the ID and User as being the same.
Any help appreciated.
Tom
In the script;
Tab:
LOAD * Inline [
ID, user, Date
1522448, MJP, 01/05/2014
1522448, MJP, 12/08/2014
1522448, MJP, 03/01/2015
];
Left Join
LOAD ID, user, Min(Date) as Date, 1 as myFlag Resident Tab Group By ID, user;
Resident Tab Group By Customer;
In the script;
Tab:
LOAD * Inline [
ID, user, Date
1522448, MJP, 01/05/2014
1522448, MJP, 12/08/2014
1522448, MJP, 03/01/2015
];
Left Join
LOAD ID, user, Min(Date) as Date, 1 as myFlag Resident Tab Group By ID, user;
Resident Tab Group By Customer;
perfect thanks!
PFA