title: MySQL SELECT users don't bought products
body: <p>How can I find users don't bought products by specific date?
  I have three tables:</p>
  
  <p>USERS
  id, name, surname, email</p>
  
  <p>PRODUCTS
  id, name, description</p>
  
  <p>TRANSACTIONS
  id, id_user, id_product, date</p>
  
  <p>I would like to know users doesn't bought products with id 1,3,4 in the last 3 months for example.</p>
  
  <p>I've tried with these:</p>
  
  <pre><code>SELECT u.* FROM users u LEFT JOIN transactions t ON u.id = t.id_user 
  WHERE t.id_product != 1 AND t.id_product != 3 AND t.id_product != 4 
  AND t.date &gt;= "2019-04-01";
  
  SELECT u.* FROM users u LEFT JOIN transactions t ON u.id = t.id_user 
  WHERE t.id_product NOT IN(1,3,4) AND t.date &gt;= "2019-04-01";
  </code></pre>