title: When to use Insert Select with Not Exist?
body: <p>Currently I am inserting new data using Where as shown in the code below.  The obvious issue is the need to change the date on a daily basis for new data to be inserted.  Below is the current code being used:</p>
  <pre><code>INSERT INTO decisions (stock_id, date_price, last_updated_date, p_LT_d50, p_GT_d50)
  SELECT stock_id, date_price, now(), adj_close_price &lt; ub1_50_d, adj_close_price &gt; ub1_50_d
  FROM bollinger_bands
  WHERE date_price = '8/04/2020';
  </code></pre>
  <p>Instead of manually changing the date on a daily basis, can I use Where Not Exist?  Should I be using Where Not Exist to solve the problem I am having?  If so, what do I fill in for the Where Not Exist portion of Select?</p>
  <p>This is what I have so far:</p>
  <pre><code>INSERT INTO decisions (stock_id, date_price, last_updated_date, p_LT_d50, p_GT_d50)
  SELECT stock_id, date_price, now(), adj_close_price &lt; ub1_50_d, adj_close_price &gt; ub1_50_d
  FROM bollinger_bands
  WHERE NOT EXISTS (SELECT 
  </code></pre>
  <p>Any assistance is appreciated.</p>