I have a table in SQL where one column contains lots of IDS some of which are duplicate, a second column with lots of dates all different
I want to create a table where i have unique list of IDS down the left hand side of the table, a column called number of days and then in the table the number of days between the last date and the second to last date that are in the table.