I have a list of customers with member_num and date when their order was submitted.
Most of them made more than one order. However I need to isolate those of them who made an only one order.
Could you, please, give me a hand? Thank you in advance,
If your data is in a SAS dataset (you could also do something similar on a database or if you have a counter for orders you could also sum that variable):
Code:
PROC SQL;
CREATE TABLE EXTRACT.ONE_ORDER AS
(SELECT
A.CUSTOMER
,A.MEMBER_NUM
,COUNT(A.MEMBER_NUM) AS MEMBER_COUNT
FROM EXTRACT.ORDERS as A
GROUP BY 1,2
HAVING MEMBER_COUNT < 2
);
QUIT;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.