SQL To find difference between multiple rows
I have a table containing multiple records for different transactions i.e. ID Date REF 1 01/09/2008 A 1 11/09/2008 A 1 01/10/2008 A 2 01/09/2008 A 2 01/10/2008 A 2 01/11/2008 B 2 01/12/2008 B and I'm looking to summarise the data so that I have the average days for each id and ref... i.e. ID Ref ...