title: Flexible search query using three tables
body: <p>I have three tables Order,Customer,Address.</p>
  
  <p>Edited :</p>
  
  <p>I want to fetch all customer's who are registeretd with website.
         If the customer has placed any order's i want to fetch the latest order from list of order's,
         If customer has not placed any order then i want to put the field as blank as shown in below table</p>
  
  <pre><code>For eg :
  
         Customer_Name   Email ID   Country   Phone   Latest_Order_Code
         A               xxxx        xxxx     x       1234 
  
         B               yyyy        yyyy     y
  
         C               ffff        tttt     l       3456
  
         D               zzzz        iiii     o
  </code></pre>
  
  <p>Any help would be appreciated?</p>