title: how to use "referred" column
body: <p>This is the question:</p>
  
  <blockquote>
    <p>Retrieve all customers who were referred to the bookstore by another customer. List each customer's last name, and the number of the customer who made the referral. (the referred column)</p>
  </blockquote>
  
  <p>This is my query:</p>
  
  <pre><code>    select lastname, referred
         from customers
         order by referred;
  </code></pre>
  
  <p>But this query returns customers that don't have a referral i.e. they have the referred column <code>(null)</code>, which means that they were never referred by another customer. How do I structure the query so that it only gives the customers who were referred by another customer?</p>
  
  <p>here's the image link of the output:
  <a href="http://i.imgur.com/oi8vhhZ.jpg" rel="nofollow">http://i.imgur.com/oi8vhhZ.jpg</a></p>