title: SQL - Nested Select Statements with Max?
body: <p>I have one table and in this table is PostDate and OrderNo and a bunch of other fields. I would like to get all the latest PostDates and then with those PostDates get the largest OrderNo. I would then like to show one row that shows the PostDate and that OrderNo. </p>
  
  <p>So far I below. This shows me all the rows with postdates from yesterday and now I want to show only the largest OrderNo in those PostDates. I tried using a nested select but I could not wrap my head around it. Any clever ideas?</p>
  
  <pre><code>SELECT OrderNo, PostDate
  FROM    table
  WHERE   PostDate = (SELECT MAX(PostDate) FROM table
  </code></pre>