title: Sql join does not return some rows with groupBy
body: <p>I am trying to learn sql.I do some practices.I created a table which called Student.</p>
  <pre><code>Id | Name   | Amount
  1  | Jone   | 100
  2  | Jack   | 200
  3  | Emily  | 300
  4  |Haaland | 500
  7  |Ted     | 700
  </code></pre>
  <p>I also created Orders table like that:</p>
  <pre><code> Id | Name    | Amount  | Dıscount
   1  | Jone    | 100     | 10
   2  | Jack    | 112     | 20
   3  | Emily   | 300     | 30
   4  |Haaland  | 500     | 50
   5  |Jack     | 88      | 12
   7  |Ted      | 150     | 235
  </code></pre>
  <p>My query is:</p>
  <pre><code>select a1.Id Id ,a1.Name Name, a1.Amount Amount , sum(a2.discount) 
  from student a1 
    left outer join orders a2 
            on a1.Id=a2.Id 
           and a1.Name=a2.Name 
          and a1.Amount = a2.Amount 
  group by a1.Id, a1.Name, a1.Amount
  </code></pre>
  <p>Result:</p>
  <pre><code>Id | Name   | Amount  | Dıscount
   1  | Jone   | 100     | 10    
   3  | Emily  | 300     | 30
   4  |Haaland | 500     | 50
   2  | Jack   | 200     | null
   7  | Ted    | 700     | null
  </code></pre>
  <p>I get null value for the jack row.I have to use <code>a1.Amount=a2.Amount</code> because I remove amount constraint Ted'discount also appears.</p>
  <p>Expected Result :</p>
  <pre><code> Id | Name   | Amount  | Dıscount
   1  | Jone   | 100     | 10    
   3  | Emily  | 300     | 30
   4  |Haaland | 500     | 50
   2  | Jack   | 200     | 32
   7  | Ted    |700      | null
   
  </code></pre>