I need to take a random sample of customers who have purchased from different categories. There are 8 categories, and orders are spread among them.
If I wanted to take a random sample of customers who have made a purchase, but keep the proportion of orders per category the same, how would I set that up in my sql code?
A table highlighting this is below (it doesn't include customer data - I want my list of customers to be based of the representative proportion of orders):
table that I am using can be found here: https://imgur.com/a/Q0lMHWf