title: SQL - last datetime
body: <p>I have select </p>
  
  <pre><code>select  FisrtTable.[Date and Time],FisrtTable.[New Value],SecondTable.[Registering Date]
  from FisrtTable
  join SecondTable
  on FisrtTable.[New Value] = SecondTable.[New Value] 
  where SecondTable.[Registering Date] &gt;= '26-05-2015  0:00'
  </code></pre>
  
  <p>I need select to retrieve last datetime by [New Value], I have </p>
  
  <p><a href="https://i.stack.imgur.com/xpFTH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xpFTH.png" alt="enter image description here"></a></p>
  
  <p>but I want only the last row by time</p>
  
  <p><a href="https://i.stack.imgur.com/VVLog.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VVLog.png" alt="enter image description here"></a></p>