title: Trying to divide 2 separate queries in MySQL
body: <p>I've seen a couple posts on dividing 2 separate queries that seemed helpful but I am still having trouble dividing these two queries. I wrote different sub queries and followed some examples, but I just keep getting errors as the example queries seemed more straight forward (no Joins).</p>
  
  <p>Here is the first query:</p>
  
  <pre><code>SELECT 
      YEAR(s.created_at) AS year,
      COUNT(*) AS pre_sub_buys
  FROM subscription_users s
  INNER JOIN users u
  ON s.user_id = u.uid
  LEFT JOIN canvases c
  ON u.email = c.ref_email
  WHERE c.is_paid=1 AND c.date_created &lt; s.created_at
  GROUP BY year;
  </code></pre>
  
  <p>And I am trying to divide this by:</p>
  
  <pre><code>SELECT 
      YEAR(s.created_at) AS year,
      COUNT(s.created_at) AS subscribers
  FROM subscription_users s
  LEFT JOIN canvases c
  ON c.entries_updated_at = s.updated_at
  GROUP BY year;
  </code></pre>
  
  <p>Essentially, I am looking to find the yearly average between presubscription purchases and subscribers.</p>
  
  <p>Can anyone direct me in the right direction on how to properly do this?</p>
  
  <p>Thank you so much,
  Jonathan</p>