Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to take a table group it by a few fields and create a list from another field. Below is an example of what I am trying to accomplish in my script:
document | user | sheet |
---|---|---|
a | ted | sh1 |
b | ted | sh2 |
c | ted | sh3 |
a | ted | sh1 |
b | ted | sh2 |
c | steve | sh3 |
a | steve | sh1 |
b | steve | sh2 |
c | steve | sh3 |
a | steve | sh4 |
From a table like the one above I want to build a table like the one below.
Header 1 | Header 2 | Header 3 |
---|---|---|
a | ted | sh1,sh1 |
b | ted | sh2,sh2 |
c | ted | sh3 |
a | steve | sh1,sh4 |
b | steve | sh2 |
c | steve | sh3,sh3 |
Table2:
Load distinct
document as [Header 1],
user as [Header 2],
concat(distinct sheet,',') as [Header 3]
resident Table1
Group by document, user;
Table2:
Load distinct
document as [Header 1],
user as [Header 2],
concat(distinct sheet,',') as [Header 3]
resident Table1
Group by document, user;