Security Trading ID Quantity Cash Apple 560 400 10 Apple 561 400 0 Apple 562 200 0 IBM 987 60 10 IBM 435 50 5 Amazon 755 500 10 Amazon 756 500 0 Nike 757 500 0 Samsung 982 100 10 Samsung 983 200 0 Samsung 122 400 10 Hi Based on the table above I am trying to figure out a way in SAS 9.3 (EG 5.1) using proc SQL Whenever cash > 0 then I would like to group the security and sum 'quantity' if trading IDs are within a range of 12. Ultimately I would like this particular table to come out as: Security Quantity Apple 1000 IBM 60 IBM 50 Amazon 1000 Nike 500 Samsung 300 Samsung 400
... View more