Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have this:
| KEY | Dates |
|---|---|
| 123 | 3-8-2013 |
| 123 | 15-8-2013 |
| 456 | 29-8-2013 |
| 456 | 6-9-2013 |
| 789 | 23-8-2013 |
and I want this:
| KEY | Dates 1 | Dates 2 |
|---|---|---|
| 123 | 3-8-2013 | 15-8-2013 |
| 456 | 29-8-2013 | 6-9-2013 |
| 789 | 23-8-2013 | - |
Regards,
Arjan
It might work if you make some changes to your script.
Instead of loading to table as it is try loading:
[MyTable]
LOAD
Key,
Min(Dates) as Date1,
Max(Dates) as Date2
FROM
Hope it helps
HI
May be like this
Load
KEY,
If(Count(Dates) > 1, Date(Max(Dates))) as Dates2,
Date(Min(Dates)) as Dates1 Resident
Test
Group by KEY;
DROP Table Test;