We are loading data via an ODBC-connection from a SQL-database. In the short script-example below, we loaded the duration of actions with a StartDate greater then 2014-12-27 23:59:59. The Name/action column is a number.
LOADName as action, StartDate, Year(StartDate) asYear, Month(StartDate) as Month, Week(StartDate) asWeek, Day(StartDate) asDay,
Duration; SQL SELECT Name, StartDate,
Duration FROM "Database".dbo.ActionsCustomer WHERE (StartDate > CONVERT(DATETIME, '2014-12-27 23:59:59'));
A customer has a repeating range of action-numbers per week. For instance:
Customer 1 has the action-numbers range 100-1400 per week
Customer 2 has the action-number range 1400-3000 per week
We have about 20 customers.
How can we attach the ranges to the customers so we can select the sum of the duration of actions per week per customer?