thanks, KurtBremser, I must admit though that doesn't seem to be working for me - I suspect my question wasn't clear. So I adapted some code/data online and run the code - is this what was intended ? I do just get the counts rather than all combinations - there is no entry in want for name=Raj and amount=20 for example data have;
input NAME $ AMOUNT ;
datalines;
RAJ 90 RAJ 40
RAVI 20
JOHN 30
JOSEPH 40
run;
proc sql;
create table want as
select name, amount, count(*) as count
from have
group by name, amount;
quit; many thanks again for your help
... View more