title: How to write a SQL query multiple rows from the input table into one row in the output table
body: <p>Please find the below query. And Suggest me</p>
  
  <pre><code>select N_EPD_CORE_BNK_TRANS_ID,
  case  
    when X_ASSIGN_STAGE='RM' 
    then  X_ASSIGN_STAGE
    end RM_stage,
    case  
    when X_ASSIGN_STAGE='RM' 
    then X_ACTION
    end RM_action,
    case  
    when X_ASSIGN_STAGE='CO' 
    then  X_ASSIGN_STAGE
    end CO_stage,
    case  
    when X_ASSIGN_STAGE='CO' 
    then X_ACTION
    end CO_action,
    Case  
    when X_ASSIGN_STAGE='CREDITREP' 
    then  X_ASSIGN_STAGE
    end CR_stage,
    Case  
    when X_ASSIGN_STAGE='CREDITREP' 
    then  X_ACTION
    End Cr_Action
    From  Rmwb_Epd_Action_Details_F Where N_Epd_Core_Bnk_Trans_Id='475';
  </code></pre>
  
  <p>The above query resulting as below in three rows by N_Epd_Core_Bnk_Trans_Id same ID</p>
  
  <pre><code> 475   null    null     CO      Escalate       null            null
   475   RM      Note     null    null           null            null
   475   null    null     null    null           CREDITREP       Escalate
  </code></pre>
  
  <p>But I am trying to get as below in single record. If  it is  possible, Please suggest me.</p>
  
  <pre><code>---------------------------------------------------------------------------------
  475     RM  Note    CO  Escalate    CREDITREP   Escalate
  </code></pre>