title: Get all WooCommerce customers paid orders with a SQL query
body: <p>I need a query that returns me all the users with orders with payment approved.</p>
  
  <p>I'm having a hard time finding where in the db this is stored. I found only post_status 'wc-complete', but I don't think this is the right info.</p>
  
  <pre><code>   SELECT a.post_status, b.meta_value FROM wp_posts a, wp_postmeta b
     WHERE a.ID = b.post_id 
     AND a.post_type = 'shop_order' 
     AND a.post_status = 'wc-completed'
  </code></pre>