title: How to retrieve the rows in a table that has a value that appears NOT the most times?
body: <p>I have two tables. </p>
  
  <p>A <code>customers</code> table and an <code>orders</code> table. </p>
  
  <pre><code>customers:                          orders:
  customer_id      customer_name      orders_id   customer_id
  1111             Charles            1020        1111
  2222             Bertram            1021        1111
  3333             Barbare            1022        2222
                                      1023        3333
  </code></pre>
  
  <p>I want the output to be:</p>
  
  <pre><code>customer_name
  Bertram
  Barbara
  </code></pre>
  
  <p>I want to retrieve only the order from <code>Bertram</code> and <code>Barbara</code> because they have not placed an order the highest numbers of times.</p>
  
  <p>The problem here is the subquery. I know how the count the numbers of times a customer has placed an order, but I am having real difficulties selecting the <code>customer_id</code> that occurs the fewest times.</p>
  
  <p>Using mySQL and Apache</p>