title: Group by returning same rows in sql
body: <p>I have the following columns coming in my output from a query</p>
  <pre><code>select 
  person_number,
  event_id,
  question,
  answer,
  seq,
  event_attempt_id,
  INTERACTION_CREATION_DATE
  from learning_table
  
  
  Person_number           Event_id            question            answer          seq  event_attempt_id       INTERACTION_CREATION_DATE
  6                       123             what is your name       Reena           78      1                       11-jan-2020
  6                       123             what is your name       Freid           67      2                       29-jan-2020
  6                       123             what is your name       Heera           89      3                       24-jan-2020
  </code></pre>
  <p>Now I want only the max row of interaction_creation_date to come in the output</p>
  <pre><code>i.e. 
  Person_number           Event_id            question            answer          seq  event_attempt_id       INTERACTION_CREATION_DATE
  6                       123             what is your name       Freid           67      2                       29-jan-2020
  </code></pre>
  <p>when i am using the below query it is still returning all the rows</p>
  <pre><code>select 
  person_number,
  event_id,
  question,
  answer,
  seq,
  max(INTERACTION_CREATION_DATE)
  from learning_table
  
  group by person_number,
  event_id,
  question,
  answer,
  seq
  </code></pre>