title: Pivot Creates an extra Row for Null values of Pivot Key
body: <p>I am using oracle sql developer and trying to pivot in based on IssueId and expecting to get one row. But it creates an extra row for null values of issue but I want all values in one row. Please, see below scenario for better explanation of this confusing problem.</p>
  
  <p>Table I have after joins :</p>
  
  <p>Data:</p>
  
  <p><a href="https://i.stack.imgur.com/mjOGy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mjOGy.png" alt="enter image description here"></a></p>
  
  <p>Current Result with Extra Null Row:</p>
  
  <p><a href="https://i.stack.imgur.com/gLMOr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gLMOr.png" alt="enter image description here"></a></p>
  
  <p>Expected Result:</p>
  
  <p><a href="https://i.stack.imgur.com/ns8B7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ns8B7.png" alt="enter image description here"></a></p>
  
  <p>My Query:</p>
  
  <pre><code>select *
  from
  (
  select  TableB.SEQ_ID,TableA.ISSUEID , TableC.Question
  from TableC RIGHT JOIN  TableB  ON TableC.QUESTIONID = TableB.QUESTION_ID 
  LEFT JOIN TableA ON TableB.QUESTION_ID = TableA.QUESTIONID AND ISSUEID = 3250
  
  ) d
  pivot
  (
    MAX(Question) 
    for SEQ_ID   in ( 1, 2, 3 ,4, 5 )
  ) piv;
  </code></pre>
  
  <p>Any suggestions related to this is appreciated. Thank You!</p>