Below is the state of my table `DUMMY_TBL`
[![enter image description here](https://i.stack.imgur.com/SMIDJ.jpg)](https://i.stack.imgur.com/SMIDJ.jpg)

I am writing a query to save the rows which were created first and delete the rest. The grouping can be done based on the LOCAL\_ID, So in this case the query should keep first and the fourth row and delete the rest. If we look in the `WHENCREATED` column, we can get the information about the creation detail of the rows.

So far I have done is 

```
select min(WHENCREATED),LOCAL_ID from DUMMY_TBL group by local_ID;

```

But this gives me only the min `WHENCREATED` date and it LOCAL\_ID. However, I am not sure how to proceed further.
Any help will be appreciated.