Hi, Is there any wrong with the below code? I want to group by formatted values. And I am not getting distinct values for the month of 201404. And let's say I don't want to use SELECT DISTINCT
proc sql;
select
customer_number
,mismonth
,put(pf_account_level_5 ,$pnl.) as account
,put((product_level_5),$product.) AS PRODUCT
,sum(base_amount) as base_amount
from CAbal1
group by customer_number
, mismonth
, account
, PRODUCT
;quit;
Output: Customer_Number MisMonth Account Product base_amount ZC00496500X 201402 AVGLIAB SGDCA 211036.2 ZC00496500X 201402 EOPLIAB SGDCA 210461.4 ZC00496500X 201403 AVGLIAB SGDCA 103288.7 ZC00496500X 201403 EOPLIAB SGDCA 90446.23 ZC00496500X 201404 AVGLIAB SGDCA 88210.63 ZC00496500X 201404 AVGLIAB SGDCA 88210.63 ZC00496500X 201404 EOPLIAB SGDCA 88596.22 ZC00496500X 201405 AVGLIAB SGDCA 88232.96 ZC00496500X 201405 EOPLIAB SGDCA 88408.44
... View more