title: Get the earliest of a date-value pair in T-SQL
body: <p>I am trying to build a query in t-sql to add a custom date-value pair column. My data contains the project ID, L Date and L Status, N Date and N Status. I know how to add the earliest date using min function. How do I capture the earliest date and it's corresponding status in my new column? In my example below, I need to find the earliest pair. My supposed query should bring the results in Earliest Dt and Status based on the data in the N and L date value pairs.</p>
  <p><a href="https://i.stack.imgur.com/2zAR5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2zAR5.png" alt="example" /></a></p>