title: SQL query summation
body: <p>I have two tables</p>
  
  <p><strong>Unit</strong></p>
  
  <pre><code>Unit_id
  Unit_name
  Unit_cost
  </code></pre>
  
  <p><strong>Components</strong></p>
  
  <pre><code>Component_id
  Component_name
  Unit_id
  </code></pre>
  
  <p>They are linked together by <code>Unit_id</code>.</p>
  
  <p><code>Unit_id = 1</code> with name <code>Unit 1 Name</code> with a cost of 100 has a number of records in <code>Component</code>.</p>
  
  <p><code>Unit_id = 2</code> with name <code>Unit 2 Name</code> and a cost of 200 also has a number of records in <code>Component</code>.</p>
  
  <p>So the total cost depends on the number of records in the <code>Component</code> table matched with the <code>unit_id</code> in the <code>Unit</code>, coupled with the <code>unit_price</code> in the <code>Unit</code> table.</p>
  
  <p>I need the single <code>Unit_name</code> of the one unit in the <code>Unit</code> table that has the highest total cost (<code>Unit.Unit_cost</code>). Note I just need the <code>Unit_Name</code> only, not total cost.</p>
  
  <p>Would it be best to use a <code>Top(1)</code> in the query? How would the query look?</p>