Hi All,
I need to write select statement for summing the AmountMST value based on AssetID,
Data is like from AssetTrans Table:
|
AssetId
|
AmountMST
|
|
AS001
|
10
|
|
AS001
|
20
|
|
AS002
|
30
|
|
AS002
|
20
|
Result should be :
AS001 – 30 // sum of AS001 (10+20)
AS002 – 50 // sum of AS002 (30+20)
I am able to get the sum value based on asset Id but in the result only sum value is displaying not the asset id.
select statement is:
select sum(AmountMST),AssetId from assetTrans
where assetTrans.AssetId == "AS001";
info(strFmt('%1,%2',assetTrans.AmountMST,assetTrans.AssetId));
Output is 30, (not displaying the assetid)
Please advice how can i get the sum value and assetid number in the output.
Regards,
Akbar