Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with fields like total_expense,material, business_name, etc. Now I want sum(total_expense) where the first grouping is to be done on the basis of material and then on business_name. How can I do that?
Is this what you are looking for?
LOAD
material,
business_name,
sum(total_expense) as sum_total_expense
FROM ...
Group By material, business_name;
Not sure what you are asking, Do you want to create a chart/table? Then use material and business_name as dimensions and sum(total expense) as the expression/measure.
I don't want to create a chart . I want to do that in the backend (in script).
Do you mean that you need to group by on the combination of material and business_name? If so just group by with material and business_name in script,
LOAD
material,
business_name,
sum(total_expense) as expense_total
resident root_table
group by material, business_name;
Is this what you are looking for?
LOAD
material,
business_name,
sum(total_expense) as sum_total_expense
FROM ...
Group By material, business_name;
YES, Thanks