title: SQL Server 2008 : SELECT min(date)
body: <p>I'm trying to do a simple select statement but I'm having a hard time doing it. </p>
  
  <p>I have a table with these columns: </p>
  
  <pre><code>companyID, CompanyDept, DateAdded
  </code></pre>
  
  <p>I'm trying to do a select statement like this...</p>
  
  <pre><code>Select CompanyID, CompanyDept 
  where min(dateAdded)
  </code></pre>
  
  <p>So there are multiple dates for <code>DateAdded</code> - I'm trying to select the <code>CompanyDept</code> and <code>COmpanyID</code> by the earliest <code>DateAdded</code>.</p>
  
  <p>EDIT: Select CompanyID, CompanyDEpt where dateAdded=MIN so because there might be three or more dates such as 10/1/2015, 11/12/2015, 1/4/2016 -(rows of data i mean) I'm trying to select this date looking at the earliest possible date (10/1/2016)</p>