I've a sample data - data1
Date User Orderid
12-02-2020 A 50274
13-02-2020 B 34704
18-02-2020 A 12079
01-03-2020 C 69711
13-03-2020 B 36813
01-04-2020 D 57321
Customer A made the first transaction in Feb and another transaction in same month. Customer B made the first transaction in Feb and made a transaction again in March.
How can I identify the customer acquisation in a month and their following months orders?
month | customers_acquired | made_transcation_in_month+1 | made_transaction_in_month+2
2 2 1 0
3 1 0 0
4 1 0 0
In the above result, In month 2, two customers made their first transcations and one of them made again in next month.
In month 3, one new customer made a transcation and never made any transactions again. Same goes with month 4.