title: How to do a stratified random sample in Redshift?
body: <p>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.</p>
  
  <p>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?</p>
  
  <p>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):</p>
  
  <p>table that I am using can be found here: <a href="https://imgur.com/a/Q0lMHWf" rel="nofollow noreferrer">https://imgur.com/a/Q0lMHWf</a></p>