Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
josemaria_cabre
Contributor III
Contributor III

Help with script

Hi,

Let's imagine we have this table

T1:
LOAD * inline [
ID|Category|Product|Area|Amount
1|1|a|C|10
2|1|b|C|10
3|1|c|C|10
4|1|d|C|10
5|2|e|C|15
6|2|f|C|15
7|2|g|C|15
8|2|h|C|15
] (delimiter is '|');

How can I get this table, grouping products by Category and Area? I assume some 'group by' coding needs to be done in script, but I don't know how.

tabla2.png

Thanks in advance for your help
Jose M.

Labels (2)
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

try with this

NoConcatenate
output:
LOAD
Area,
Category,
Concat(DISTINCT Product,',') as Product,
Sum(Amount)
Resident T1
Group By
Area,
Category
;

View solution in original post

2 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

try with this

NoConcatenate
output:
LOAD
Area,
Category,
Concat(DISTINCT Product,',') as Product,
Sum(Amount)
Resident T1
Group By
Area,
Category
;

josemaria_cabre
Contributor III
Contributor III
Author

Worked perfect, Thanks a lot!

Best regards,
Jose M.