title: MySQL select datetime for expired subscriptions
body: <p>I have a table called "subscriptions" with these columns:</p>
  
  <ul>
  <li>id</li>
  <li>client_id</li>
  <li>date</li>
  <li>expiring</li>
  </ul>
  
  <p>I would like to select all values that their subscriptions are expired and they don't have any ongoing subscriptions.</p>
  
  <p>For example I have these records in this table:</p>
  
  <p><strong>id | client_id | date | expiring</strong><br>
  1 | 23 | 2015-07-07 08:26:08 | 2015-07-27 08:26:08<br>
  2 | 23 | 2015-07-10 08:26:08 | 2015-07-15 08:26:08<br>
  3 | 21 | 2015-07-14 08:26:08 | 2015-07-15 08:26:08<br><br></p>
  
  <p>That means the result should show me client with ID 21 but not the client with ID 23 since he has an active subscription.</p>
  
  <p>I hope i explained it well.</p>
  
  <p>Thanks in advance</p>