title: How to get last recent value only
body: <p>I have two tables master <code>table1</code> and detail <code>table2</code></p>
  
  <p><code>Table1</code> structure</p>
  
  <pre><code>table1_id integer,
  description varchar(50)
  </code></pre>
  
  <p><code>Table2</code> structure</p>
  
  <pre><code>table2_id integer,
  table1_id integer,
  price numeric(7,2),
  Price_date date
  </code></pre>
  
  <p>I need to write SQL or a view that link between these two tables but the problem I want from <code>table2</code> only to get a single value that is the most recent one of the <code>price</code> field using the <code>price_date</code> field to be linked with <code>table1</code>, in other words I dont want to get any duplicates from <code>Table2.table1_id</code> field. how I should write that SQL ?</p>