title: Is it possible to get list of all id's that are grouped by
body: <p>WE have a springboot application and there a scenario where we are using native query to insert data into a table based on the groupby query on another table. Now, I need to get the list of all the id's of the records that are grouped by before insert.</p>
  <p>Query:</p>
  <pre><code>insert into table2 (column1,column2) 
  select column1,column2 
  from table1 
  group by column1,column2
  </code></pre>
  <p>Now, I need to get the list of id's that are grouped in table1. Is  it possible?</p>