Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table & script as shown below:
ITEM CLASS AMOUNT
One A $10
Two B $20
Three B $16
Four A $8
TABLE:
ITEM,
CLASS,
Sum(AMOUNT) as AMOUNT
Resident
Data
Group by
ITEM,
CLASS;
What I want to do, is include a new field, NAME. Here is the table I am trying to recreate:
ITEM CLASS NAME AMOUNT
One A Nick $5
One A Jerry $5
Two B Sarah $20
Three B Alex $10
Three B Carlos $6
Four A Miguel $8
My problem, however, is that when I use the below script the numbers are incorrect and are much higher than they should be. Like the above script/table, I just want to group by the ITEM & CLASS, not the NAME. Ultimately, my sum of amount, should not change at all.
Here is the script I am trying, but doesn't work...
TABLE:
ITEM,
CLASS,
NAME
Sum(AMOUNT) as AMOUNT
Resident
Data
Group by
ITEM,
CLASS,
NAME;
Is it possible for me to just group by the ITEM and CLASS like I did initially?
Thanks!
Hi Data Guru,
I'm not sure why you are trying to aggregate this data.
If you load the table with NAME is it, this is the result in trying to see the data.
Lisa