title: Joining SQL lookup table with data table
body: <p>I have a lookup table say cities with fields CityId, CityName</p>
  
  <pre><code>CityId   CityName
  1        New York 
  2        San Francisco
  3        Chicago
  </code></pre>
  
  <p>I have an orders table which has fields: CityId, CustId, CompletedOrders, PendingOrders</p>
  
  <pre><code>CityId CustId CompletedOrders PendingOrders
  1       123   100             50
  2       123   75              20
  </code></pre>
  
  <p>I want a table/report that lists orders details of a given customer in all cities, i.e. the result I need is:</p>
  
  <pre><code>CityId CityName      CustId CompletedOrders PendingOrders
  1      New York      123    100             50
  2      San Francisco 123    75              20
  3      Chicago       123    0               0
  </code></pre>
  
  <p>How to do that ?</p>