title: Getting multiple column values in single row
body: <p>This is my actual result and i have used for store details of client</p>
  
  <pre><code>    SID       ATTRIBUTE_VALUES   ATTRIBUTE_ID      
      ---------- ----------------   -----------
      20         101010             MEMBERSHIP_NO 
      20         ALLEN              MEMBERSHIP_NAME
      20         WARD               MEMBERSHIP_LNAME
      30         101011             MEMBERSHIP_NO
      30         MARTIN             MEMBERSHIP_NAME
      30         BLAKE              MEMBERSHIP_LNAME
  </code></pre>
  
  <p>In this I need to retrieve the details based on membership no and also using sid. sid is unique number .
  I need to show the result as </p>
  
  <pre><code>    SID MEMBERSHIP_NO MEMBERSHIP_NAME MEMBERSHIP_LNAME
      -----   ------------- --------------- ----------------
      20      101010        ALLEN           WARD
      30      101011        MARTIN          BLAKE
  </code></pre>
  
  <p>Above 3 attributes are constant using that values only client number, names are inserts into table. Im stuck with this...I need to solution for it.</p>
  
  <p>This is the query i have used for retrieve the details. But it returns empty</p>
  
  <pre><code>    SELECT sid,  LISTAGG(attribute_value, ',') WITHIN GROUP 
      (ORDER BY attribute_value) AS att FROM customer_attributes WHERE 
      sid ='20' AND attribute_value='101010'
      AND attribute_id ='MEMBERSHIP_NO'
      AND attribute_id ='MEMBERSHIP_NAME'
      AND attribute_id ='MEMBERSHIP_LNAME'
      GROUP BY SID;
  </code></pre>