this is my table
region price sales
1 23 45
1 34 456
1 233 3465
1 65 34
2 23 3545
2 67 5653
i need to create a new table with
region median(price) sum(sales)
can someone tell me how to do that?
no actually i am writing a proc sql which i need help with. let me show you a small piece of my code.
finally2 is the table name
proc SQL;
Create Table last
(
REGION NUM,
sum_sales DEC,
median_price DEC );
Quit;
proc sql;
insert into last
SELECT finally2.REGION,
SUM(finally2.sales) As Sum_sales,
______ as median_price
FROM finally2
Group by finally2.REGION;
quit;
run;
... View more