I have a transactional table, that has two id reference fields NEW\_REF, Orginal\_REF. So in this transactional table I can have multple transactions that actually relate to the one event. When a new event is added, it gets an NEW\_REF and the Original\_REF field is null. If somehting changes about this event, a new record is created, and the new record has its Original\_REF update to that of the previous NEW\_REF ID.

So as an example, in my table, I have:

```
REF1 | Original_Ref
 956 | 200
 960 | null
 967 | 960
 980 | 967
 990 | 600
 991 | 700
 992 | 670
 998 | 343
1000 | 980
1001 | 778
1010 | 787
1020 | 565

```

As an example, if an event has more than one related transaction, I want to be able to have a query that would pull out all related transactions, per event. In the above example, I would expect to see:

```
REF1 | Original_Ref
 960 | null
 967 | 960
 980 | 967
1000 | 980

```

Here Records 960 is the original record and has been updated 3 times. Is there a way of quering my table to identify and group together related transactions per event?