Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 johnan
		
			johnan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI, totalt stop in the head.
I got this table with data:
| CustSellerID | CustBuyerID | Amount | 
| 4 | 5 | 3000 | 
| 1 | 7 | 130 | 
| 4 | 3 | 300 | 
| 6 | 4 | 200 | 
I want to compile the results like this:
| Customer | Sell | Buy | 
| 4 | 3500 | 200 | 
| 1 | 130 | 0 | 
| 7 | 0 | 130 | 
| 6 | 200 | 0 | 
| 5 | 0 | 3000 | 
| 3 | 300 | 0 | 
 MayilVahanan
		
			MayilVahanan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Try like below
Cust:
LOAD * INLINE [
CustSellerID, CustBuyerID, Amount
4, 5, 3000
1, 7, 130
4, 3, 300
6, 4, 200
];
FCust:
LOAD CustSellerID as Customer, Sum(Amount) as Sell Resident Cust Group by CustSellerID;
Join
LOAD CustBuyerID as Customer, Sum(Amount) as Buy Resident Cust Group by CustBuyerID;
DROP Table Cust;
 MayilVahanan
		
			MayilVahanan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Try like below
Cust:
LOAD * INLINE [
CustSellerID, CustBuyerID, Amount
4, 5, 3000
1, 7, 130
4, 3, 300
6, 4, 200
];
FCust:
LOAD CustSellerID as Customer, Sum(Amount) as Sell Resident Cust Group by CustSellerID;
Join
LOAD CustBuyerID as Customer, Sum(Amount) as Buy Resident Cust Group by CustBuyerID;
DROP Table Cust;
