title: using MIN within WHERE
body: <p>Is there a way to use <code>MIN</code> within the <code>WHERE</code> clause? </p>
  
  <p>I'm trying to insert a subquery into one of my scripts and the subquery I set up was originally its own query that used something like this:</p>
  
  <pre><code>SELECT
     person, MIN(date)
  FROM
     orders
  WHERE
     date &gt; "1/1/2015" and date &lt; "1/31/2015"
  GROUP BY
     person
  </code></pre>
  
  <p>This was to ensure the FIRST record, the earliest record, was the return value. Using <code>ORDER BY ASC LIMIT 1</code> didnt work. I want to replicate this so that I can say:</p>
  
  <pre><code>WHERE
     otherPersons IN (
        SELECT
           person, MIN(date)
        FROM
           orders
        WHERE
           date &gt; "1/1/2015" and date &lt; "1/31/2015"
      )
        GROUP BY
          person
  </code></pre>
  
  <p>Meaning, otherPersons has to be in Person, but only those persons whose earliest date falls within  my date spread. I understand this is impossible as a subquery can only have 1 column selected.</p>
  
  <p>I'm new to SQL, sorry for the simplicity of the question. </p>