title: How to deal with each rows and combined several rows into one row in oracle/sql
body: <p>I am new to oracle 11g. I've done some research, but none of them does exactly what i want..</p>
  
  <p>Here are my tables.</p>
  
  <p>T1</p>
  
  <pre><code>Date_       Name    Subject      Mark
  2011        AAA      History      80
  2011        AAA      CS           85
  2013        AAA      Math         90
  2013        AAA      Science      91
  2013        AAA      CS           92
  </code></pre>
  
  <p>T2. This is a scale table</p>
  
  <pre><code>Subject    Weight
  Math         2
  CS           2.1
  History      1.9
  Science      2
  </code></pre>
  
  <p>I want my output to be:</p>
  
  <pre><code>T3
  
  Date_    Name   Math   History  CS     Science
  2011     AAA            160     178.5
  2013     AAA    180             193.2   182
  </code></pre>
  
  <p>Thanks very much!</p>