Hi!
I have a database in which I'd appreciate some assistance in carefully counting some variables. Here is a sample of what I'm working with:
I'd like to count a few things:Code:Store ID Customer ID Date Purchased 123 1 01 Feb 123 1 02 Feb 123 2 01 Feb
(a) how many unique stores do i have in my data set?
(b) how many distinct customers did each store ID recieve (here the answer would be 2 for the example)Code:I did the following: proc sort data = blah nodupkey out=blah2 by storeid run;
(c) how many purchases were done by each store id in general (I have a feeling I can just use a first. and last. by processing for store_id).





Reply With Quote

