title: SQL - How to check for multiple values of one column while only returning one row?
body: <p>Sorry if the question was worded weird.</p>
  
  <p>I'm writing a report and I have a table that has fields like this....</p>
  
  <pre><code>      applicationID statusid statuscreationdate
  
        123                  1  3-18-2013
        123                  2  3-27-2013
        124                  1  3-29-2013
        125                  1  4-1-2013
        125                  2  4-3-2013
  </code></pre>
  
  <p>And I only want to return rows with a statusid of 1 BUT I also want to check if a statusid of 2 exists for each applicationid. So the desired query on the above table would produce:</p>
  
  <pre><code>     123 3-18-2013
       125 4-1-2013
  </code></pre>
  
  <p>Any help would be appreciated. If more information is needed, let me know. I wanted to keep this as short and simple as possible while including the necessary amount of information.</p>
  
  <p>Thanks for your time.</p>
  
  <p>Edit: corrected the desired results part</p>