title: SQL: No records in the last week
body: <p>I have a table with different columns. Two of them are user and data. I want to find which users have no records in the last week.</p>
  
  <p>How far have I arrived:  </p>
  
  <p>This gives me well the records ordered first by user and then by date:  </p>
  
  <pre><code>SELECT * 
  FROM table1  
  ORDER BY user, date
  </code></pre>
  
  <p>I also could find a way to store one week in a var:</p>
  
  <pre><code>$oneWeek = strtotime("-1 week");
  $oneWeek = date("Y-m-d H:i:s", $oneWeek);
  echo $oneWeek . "&lt;br&gt;";
  </code></pre>
  
  <p>Is there a way I can select the users that do not have any records in the last seven days?</p>