title: JOIN Multiple Tables with SUM
body: <p>I need help with the scenario below.</p>
  
  <p>order table</p>
  
  <pre><code>orderId    orderAmount
  10001      1000.00
  10002      2000.00
  10003      3000.00
  10004      1000.00
  10005      1000.00
  </code></pre>
  
  <p>transfer table</p>
  
  <pre><code>transferId    orderId    transferAmount
  9001          10001      100.00
  9002          10001      200.00
  9003          10001      25.00
  9004          10002      250.00
  9005          10002      450.00
  9006          10004      100.00
  </code></pre>
  
  <p>returns table</p>
  
  <pre><code>returnId      orderId    returnAmount
  8001          10001      450.00
  8002          10001      50.00
  8003          10002      245.00
  8004          10003      100.00
  </code></pre>
  
  <p>Result Needed</p>
  
  <pre><code>/*include all orders from orders table, even if no transfers or returns*/
  orderId       transfers      returns
  10001         325.00         500.00 /*sum of transfers and returns per orderId from respective tables*/
  10002         700.00         245.00
  10003         0.00           100.00
  10004         100.00         0.00
  10005         0.00           0.00   /*use zero whenever no rows for orderId in respective table*/
  </code></pre>
  
  <p>How can I implement the above in single query?</p>