Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Thanks in advance for your help
Jose M.
Hi,
try with this
NoConcatenate
output:
LOAD
Area,
Category,
Concat(DISTINCT Product,',') as Product,
Sum(Amount)
Resident T1
Group By
Area,
Category
;
Hi,
try with this
NoConcatenate
output:
LOAD
Area,
Category,
Concat(DISTINCT Product,',') as Product,
Sum(Amount)
Resident T1
Group By
Area,
Category
;
Worked perfect, Thanks a lot!
Best regards,
Jose M.