Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
we have a table "Order" with a field "Season" and we would like to compare values of two seasons.
We would like to avoid creating the second table in the script, also because it doesn't work if we then filter by article.
What to avoid:
TotalSeason:
Load Season as TotSeason, Sum(Qty) as TotQty
resident Order
group by Season;
Thanks.
Here is the script to generate sample data:
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='€ #.##0,00;-€ #.##0,00';
SET TimeFormat='hh:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';
SET MonthNames='gen;feb;mar;apr;mag;giu;lug;ago;set;ott;nov;dic';
SET DayNames='lun;mar;mer;gio;ven;sab;dom';
Order:
LOAD * INLINE [
Season, Article, Qty
E23, AAA, 10
E23, AAA, 20
E24, BBB, 30
E24, AAA, 40
E24, CCC, 50
E23, CCC, 20
I23, AAA, 10
I23, BBB, 40
I24, AAA, 30
I24, CCC, 60
];
TabSeason2:
Load distinct Season as CompareSeason
resident Order;
TotalSeason:
Load Season as TotSeason, Sum(Qty) as TotQty
resident Order
group by Season;
hI,
As I said
We would like to avoid creating the second table in the script,
Thank you